模板:Block
出自Meshal Lite
(修订版本间的差异)
(修正了indent参数的应用错误) |
|||
第1行: | 第1行: | ||
− | <includeonly>{{#vardefine: indent|{{{indent|0}}}||0|{{{indent|0}}}}}{{#vardefine: contentTextColor|{{#switch: {{{3|{{{preset|rule}}}}}} | + | <includeonly>{{#vardefine: indent|{{#ifeq:{{{indent|0}}}||0|{{{indent|0}}}}}}}{{#vardefine: contentTextColor|{{#switch: {{{3|{{{preset|rule}}}}}} |
|rule=inherit | |rule=inherit | ||
|info=inherit | |info=inherit |
在2018年3月29日 (四) 10:06所做的修订版本
加入一段含有标题的文本块,它会以框体(标题和正文)的形式呈现。
1 或 title
这段文字的标题,留空则不显示标题。
2 或 text
这段文字的具体内容
3 或 preset
这段文字的预设配色,决定了这个段落的配色(会被headerTextColor
、headerBgColor
、contentTextColor
、contentBgColor
覆盖)
- 你可以参考帮助:Block模板样式预览查看预设配色样式。
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
{{block
|title=标题……
|text=正文……
}}
|title=标题……
|text=正文……
}}