More actions
No edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
* bgcolor: 标题背景颜色(如 yellow、lightgray),默认为透明。 | * bgcolor: 标题背景颜色(如 yellow、lightgray),默认为透明。 | ||
* header: 设置标题标签(如 h1、h2、h3),默认为 h3。 | * header: 设置标题标签(如 h1、h2、h3),默认为 h3。 | ||
* border- | * border-left: 左侧边框的宽度(如 2px),默认为 0。 | ||
* | * border-bottom: 下划线的粗细(如 1px),默认为 0,若未设置则无下划线。 | ||
== 用法 == | == 用法 == | ||
<pre><nowiki> | <pre><nowiki> | ||
Line 14: | Line 14: | ||
| bgcolor = #f0f0f0 | | bgcolor = #f0f0f0 | ||
| color = #333 | | color = #333 | ||
| border- | | border-left = 10px | ||
| | | border-bottom = 2px | ||
}} | }} | ||
</nowiki></pre> | </nowiki></pre> | ||
Line 31: | Line 31: | ||
| header = h2 | | header = h2 | ||
| color = green | | color = green | ||
| | | border-bottom = 2px | ||
}} | }} | ||
{{StyledHeader | {{StyledHeader | ||
Line 37: | Line 37: | ||
| bgcolor = yellow | | bgcolor = yellow | ||
| color = black | | color = black | ||
| border- | | border-left = 5px | ||
| | | border-bottom = 2px | ||
}} | }} | ||
{{StyledHeader | {{StyledHeader | ||
Line 45: | Line 45: | ||
| bgcolor = #f0f0f0 | | bgcolor = #f0f0f0 | ||
| color = #333 | | color = #333 | ||
| border- | | border-left = 10px | ||
}} | }} | ||
</noinclude> | </noinclude> | ||
<includeonly> | <includeonly><onlyinclude>{{#invoke:StyledHeader|customStyles}}</onlyinclude></includeonly> | ||
<onlyinclude> | |||
</onlyinclude> | |||
</includeonly> |
Revision as of 09:59, 18 July 2024
参数说明
- text: 要显示的标题文本。
- color: 标题文字颜色(如 red、blue),默认为 black。
- bgcolor: 标题背景颜色(如 yellow、lightgray),默认为透明。
- header: 设置标题标签(如 h1、h2、h3),默认为 h3。
- border-left: 左侧边框的宽度(如 2px),默认为 0。
- border-bottom: 下划线的粗细(如 1px),默认为 0,若未设置则无下划线。
用法
{{StyledHeader | text = 用 h1 标签,具有灰色背景、深灰色文字、10px 宽的左边框和2px粗的下划线。 | header = h1 | bgcolor = #f0f0f0 | color = #333 | border-left = 10px | border-bottom = 2px }}
效果展示
显示一个简单的黑色标题,背景透明,没有边框和下划线
有浅蓝色背景和深蓝色文字,仍使用默认的 h1 标签
使用 h2 标签显示绿色标题,背景透明, 和2px粗的下划线。
有黄色背景、黑色文字、5px 宽的左侧边框和2px粗的下划线。
用 h3 标签,具有灰色背景、深灰色文字、10px 宽的左边框。