模板:Block
出自Meshal Lite
(修订版本间的差异)
第49行: | 第49行: | ||
|#default=}}}}<div class="block" style="background-color: {{{contentBgColor |{{#var: contentBgColor}}}}}; border-color: {{{headerBgColor |{{#var: headerBgColor}}}}}; width: calc(100% - {{{indent|0}}}em); margin-left: {{{indent|0}}}em;{{#var: containerStyle}};"><div class="blockTitle" style="background-color: {{{headerBgColor |{{#var: headerBgColor}}}}}; color: {{{headerTextColor|{{#var: headerTextColor}}}}}; {{{headerStyle|}}}">{{{1|{{{title|}}}}}}<span style="float:right; font-size:smaller;">{{{tip|}}}</span></div> | |#default=}}}}<div class="block" style="background-color: {{{contentBgColor |{{#var: contentBgColor}}}}}; border-color: {{{headerBgColor |{{#var: headerBgColor}}}}}; width: calc(100% - {{{indent|0}}}em); margin-left: {{{indent|0}}}em;{{#var: containerStyle}};"><div class="blockTitle" style="background-color: {{{headerBgColor |{{#var: headerBgColor}}}}}; color: {{{headerTextColor|{{#var: headerTextColor}}}}}; {{{headerStyle|}}}">{{{1|{{{title|}}}}}}<span style="float:right; font-size:smaller;">{{{tip|}}}</span></div> | ||
<div class="blockContent" style="color: {{{contentTextColor|{{#var:contentTextColor}}}}}; {{{contentStyle|}}}"> | <div class="blockContent" style="color: {{{contentTextColor|{{#var:contentTextColor}}}}}; {{{contentStyle|}}}"> | ||
− | {{{2|{{{text|}}}}}}</div></div></includeonly><noinclude>{{ | + | {{{2|{{{text|}}}}}}</div></div></includeonly><noinclude>{{tpl_helpdoc}}</noinclude> |
在2019年1月3日 (四) 05:58所做的修订版本
编辑简介内容 加入一段含有标题的文本块,它会以框体(标题和正文)的形式呈现。
使用
{{block|
|[1] title=
|[2] text=
|[3] preset= <rule | info | legend | datalist | feature | ability | item | code | ...>
|tip=
|headerTextColor=
|headerBgColor=
|contentTextColor=
|contentBgColor=
|headerStyle=
|contentStyle=
|indent=0
}}
|[1] title=
|[2] text=
|[3] preset= <rule | info | legend | datalist | feature | ability | item | code | ...>
|tip=
|headerTextColor=
|headerBgColor=
|contentTextColor=
|contentBgColor=
|headerStyle=
|contentStyle=
|indent=0
}}
1
title这段文字的标题,留空则不显示标题。
2
text这段文字的具体内容
3
preset这段文字的预设配色,决定了这个段落的配色(会被headerTextColor
、headerBgColor
、contentTextColor
、contentBgColor
覆盖)
- 你可以参考Template:Block/模板样式查看预设配色样式。
tip
位于文本块右上角的提示文字,留空则不显示。
headerTextColor
标题区的文本颜色。
- 默认为rgb(255,255,255)
headerBgColor
标题区的背景色。
- 默认为rgb(116,125,130)
contentTextColor
正文区的文本颜色。
- 默认为inherit
contentBgColor
正文区的背景色。
- 默认为rgb(242,242,242)
headerStyle
标题区追加的css样式,可自定义
contentStyle
正文区追加的css样式,可自定义
indent
这个区块的缩进尺寸,单位是em。填写1即等于缩进1em。
- 默认为0