Template:Fmbox/doc:修订间差异
删除的内容 添加的内容
开篇添加 Mbox templates 导航 |
从 zhwiki 适配完整文档,追加 Uses TemplateStyles 声明 |
||
| (未显示同一用户的2个中间版本) | |||
第1行:
{{Mbox templates}}▼
{{Documentation subpage}}
{{Uses Lua|Module:Message box}}
{{Uses TemplateStyles|Module:Message box/fmbox.css}}
▲{{Mbox templates}}
'''{{tlx|Fmbox}}'''(Footer & header message
== 常用参数 ==
第11行 ⟶ 第12行:
| <code>type</code> || <code>warning</code> / <code>editnotice</code> / <code>system</code>
|-
| <code>image</code> || 自定义图标(<code>none</code> 则不显示图片)
|-
| <code>
|-
| <code>id</code> || CSS id,用于 JavaScript 检测
|-
| <code>class</code> || CSS 类名,用于个性化皮肤
|-
| <code>style</code> || 整个信息框的 CSS 样式
|-
| <code>textstyle</code> || 文字单元格的 CSS 样式
|-
| <code>text</code> || 消息正文
|}
==
{{Fmbox|type=
{{Fmbox|type=editnotice|text=type=<u>editnotice</u> 编辑
{{Fmbox|type=system|text=type=<u>system</u> 系统消息(浅灰背景,默认)}}
未指定 type 时默认为 <code>system</code>。
== 特殊设定 ==
{{Fmbox|text=未指定 type 和 image(默认)}}
{{Fmbox|image=none|text=image=none — 不使用图片,text 占用整个区域}}
== 参数说明 ==
<syntaxhighlight lang="wikitext">
{{fmbox
| type = system / editnotice / warning
| image = none / [[File:Some image.svg|40px]]
| imageright = [[File:Some image.svg|40px]]
| id = CSS id
| class = CSS 类名
| style = CSS 取值
| textstyle = CSS 取值
| text = 消息正文
}}
</syntaxhighlight>
== 技术细节 ==
如需在 text 参数中使用特殊字符:
<syntaxhighlight lang="wikitext">
{{fmbox
| text =
等号 = 与前后大括号 { } 可以正常使用。
但管道符 {{!}} 与两个后大括号 <nowiki>}}</nowiki> 不能直接使用。
}}
</syntaxhighlight>
如果需要宽度不足 100% 的框,请使用 {{tlx|Ombox}}。
== 参见 ==
* {{tlx|Ambox}} — 条目消息框
* {{tlx|
* {{tlx|Imbox}} — 文件页消息框
* {{tlx|Cmbox}} — 分类消息框
* {{tlx|Ombox}} — 其他页面消息框
* {{tlx|Mbox}} — 自动检测命名空间
<includeonly>
| |||