模板:Infobox/doc:修订间差异
小无编辑摘要 |
小无编辑摘要 |
||
| 第49行: | 第49行: | ||
;headerstyle : 应用到所有的顶栏单元。 | ;headerstyle : 应用到所有的顶栏单元。 | ||
;header(n)style : 应用到第n行的顶栏单元。 | ;header(n)style : 应用到第n行的顶栏单元。 | ||
;labelstyle : | ;labelstyle : 应用到所有的标签单元。如果希望避免标签文字折行显示,只需在该处填写的内容中包含“<syntaxhighlight lang="css" inline>white-space:nowrap;</syntaxhighlight>”。或者例如“min-width: 4em;”。 | ||
;label(n)style : 应用到第n行的标签单元。 | ;label(n)style : 应用到第n行的标签单元。 | ||
;datastyle : 应用到所有的数据单元。 | ;datastyle : 应用到所有的数据单元。 | ||
| 第121行: | 第121行: | ||
=== 用例 === | === 用例 === | ||
{ | {|style="border: 0px; width: 100%;" | ||
| | |- | ||
|{{Template Pre | |||
|br = <td style="vertical-align: top;"> | |||
|demo_kill_categories =yes | |||
|<nowiki>{{Infobox | |||
| | |||
| | |||
| | |||
| | |||
< | |||
{{Infobox | |||
|name = Infobox | |name = Infobox | ||
|bodystyle = | |bodystyle = | ||
| 第178行: | 第149行: | ||
|data3 = 独自定义的数据 | |data3 = 独自定义的数据 | ||
|header4 = 三项均有定义(顶栏) | |header4 = 三项均有定义(顶栏) | ||
|label4 = | |label4 = 三项均有定义(标签)——错误:因为有设顶栏而不会显示出来 | ||
|data4 = | |data4 = 三项均有定义(数据)——错误:因为有设顶栏而不会显示出来 | ||
|header5 = | |header5 = | ||
|label5 = 标签和数据有定义(标签) | |label5 = 标签和数据有定义(标签) | ||
| 第186行: | 第157行: | ||
|belowstyle = background:#ddf; | |belowstyle = background:#ddf; | ||
|below = 下方文本 | |below = 下方文本 | ||
}} | }}</nowiki>}} | ||
</ | |} | ||
注意到,当标签脱离数据单元单独定义时,所定义的那一行并未出现在信息框内;而当顶栏与标签、数据定义在同一栏时,顶栏将会优先显示。 | 注意到,当标签脱离数据单元单独定义时,所定义的那一行并未出现在信息框内;而当顶栏与标签、数据定义在同一栏时,顶栏将会优先显示。 | ||