跳转到内容

模板:Table style/doc

維基文庫,自由的圖書館
捷径
ts


用法

[编辑]

此模板允许使用速记表格样式参数。 它最多支持 10 个 CSS 样式命令(例如“text-align:right;”),每个命令都绑定到一个速记代码。

如果要添加速记条目,请将其添加到{{table style/parse}}

如果你需要的 CSS 样式代码不在下表中,你也可以另外使用 CSS 代码,或与速记代码组合使用。

CSS 样式代码需要以分号(;)结束,而速记代码包括分号(;)。

参数列表

[编辑]
添加新代码时,请按字母顺序插入此表中。
CSS 样式代码 速记代码 自然语言 表格 单元格 备注
width:210mm; padding:25.4mm; a4 设置一张 A4 宽度的表格
background-color:transparent; bgt transparent ?
background-color:#ffffff; bgw
bgff
white achromatic colors – shorthand:
 
bgXX
 
where XX is the repeated hex pair (for R, G or B) from the RGB color code in hexadecimal form – the letters used here are lowercase
background-color:#f2f2f2; bgf2 gray 95
grey 95
background-color:#d3d3d3; bgd3 light gray
light grey
background-color:#808080; bg80 gray
grey
background-color:#000000; bg00
bgbk
black
background-color:#ffd700; b1 gold
background-color:#c0c0c0; b2 silver
background-color:#cc9966; b3 bronze
background-color:#9acdff; b4 pale blue
background-color:#ffd700; font-weight:bold; b1b gold background, bold font
background-color:#c0c0c0; font-weight:bold; b2b silver background, bold font
background-color:#cc9966; font-weight:bold; b3b bronze background, bold font
background-color:#9acdff; font-weight:bold; b4b pale blue background, bold font
border:1px dotted black; ba.
border:1px dashed black; ba-
border:1px solid black; ba border all
border:2px solid black; ba2
border:3px solid black; ba3
border:4px double black; bad
border:none; bn
border-bottom:0px solid transparent; bbt use border-bottom:1px solid transparent;
border-bottom:1px dotted black; bb.
border-bottom:1px dashed black; bb-
border-bottom:2px dotted black; bb2.
border-bottom:1px solid black; bb border bottom
border-bottom:1px solid transparent; bbt1 ?
border-bottom:2px solid black; bb2
border-bottom:3px solid black; bb3
border-bottom:4px double black; bbd
border-collapse:collapse; bc border collapse
border-left:0px solid transparent; blt
border-left:1px dotted black; bl.
border-left:1px dashed black; bl- border-left:1px solid black; bl border left
border-left:1px solid transparent; blt1 ?
border-left:2px solid black; bl2
border-left:3px solid black; bl3
border-left:4px double black; bld
border-right:0px solid transparent; brt
border-right:1px dotted black; br.
border-right:1px dashed black; br-
border-right:2px dotted black; br2.
border-right:1px solid black; br border right
border-right:1px solid transparent; brt1 ?
border-right:2px solid black; br2
border-right:3px solid black; br3
border-right:4px double black; brd
border-top:0px solid transparent; btt
border-top:1px dotted black; bt.
border-top:1px dashed black; bt-
border-top:1px solid black; bt border top
border-top:1px solid transparent; btt1 ? 'border:none' doesn't work on many browsers, use transparent instead
border-top:2px solid black; bt2
border-top:3px solid black; bt3
border-top:4px double black; btd
direction:rtl; rtl ? ?
float:left; fll float left Breaks text flow.
float:right; flr float right Breaks text flow.
font-size:105%; fs105 Used for PSM sub titles
font-size:120%; lg larger
font-size:144%; xl x-large
font-size:182%; 2xl xx-large
font-size:207%; 3xl xxx-large
font-size:249%; 4xl xxxx-large
font-size:58%; xxs xx-small
font-size:69%; xs x-small
font-size:80%; sm80
font-size:83%; sm smaller
font-size:85%; sm85
font-size:90%; sm90
font-size:92%; sm92
font-size:95%; sm95
font-size:100%; sm100
font-size:105%; sm105
font-size:107%; sm107
font-size:110%; sm110
font-style:italic; fsi italic
font-style:normal; fsn roman
font-variant:normal; fvn roman
font-variant:small-caps; sc small caps
font-weight:bold; fwb bold
font-weight:normal; fwn normal
line-height:100%; lh1
line-height:100%; lh10
line-height:110%; lh11
line-height:120%; lh12
line-height:130%; lh13
line-height:150%; lh15
line-height:200%; lh2
line-height:200%; lh20
line-height:95%; lh95
margin:0 auto 0 auto; mc float ?
margin:10px; ma10 ?
margin:5px; ma5 ?
margin-bottom:10px; mb10 ?
margin-bottom:5px; mb5 ?
margin-left:10px; ml10 ?
margin-left:5px; ml5 ?
margin-right:10px; mr10 ?
margin-right:5px; mr5 ?
margin-right:auto; margin-left:auto; ma ? ?
margin-top:10px; mt10 ?
margin-top:5px; mt5 ?
padding:0; pa0 no padding padding all sides
padding:1px; pa1
padding:2px; pa2
padding:3px; pa3
padding:4px; pa4
padding:0.5em; pa.5
padding:1.0em; pa1.0
padding-bottom:0.5em; pb.5
padding-bottom:0; pb0
padding-bottom:1.0em; pb1
padding-bottom:1.5em; pb15
padding-bottom:2.0em; pb2
padding-bottom:3.0em; pb3
padding-bottom:4.0em; pb4
padding-bottom:5.0em; pb5
padding-left:1.0em;text-indent:-1.0em; it1
padding-left:1.5em; text-indent:-1.0em; it1p.5
padding-left:2.0em; text-indent:-1.0em; itp
padding-left:2.0em;text-indent:-2.0em; it
padding-left:2.5em; text-indent:-2.0em; itp.5
padding-left:3.0em; text-indent:-1.0em; it1p2
padding-left:4.0em;text-indent:-2.0em; it42 ? PSM indent for literature section entries in the volume index.
padding-left:0.5em; pl.5
padding-left:0; pl0
padding-left:1.0em; pl1
padding-left:1.5em; pl15
padding-left:2.0em; pl2
padding-left:3.0em; pl3
padding-left:3.5em; pl3.5
padding-left:4.0em; pl4
padding-left:5.0em; pl5
padding-left:6.0em; pl6
padding-left:7.0em; pl7
padding-right:0.5em; pr.5
padding-right:0; pr0
padding-right:1.0em; pr1
padding-right:1.5em; pr15
padding-right:2.0em; pr2
padding-right:3.0em; pr3
padding-right:3.5em; pr3.5
padding-right:4.0em; pr4
padding-right:5.0em; pr5
padding-right:6.0em; pr6
padding-right:7.0em; pr7
padding-top:0.5em; padding-bottom:0.5em; ptb.5 Padding title rows
padding-top:1em; padding-bottom:1em; ptb1
padding-top:0.5em; pt.5
padding-top:0; pt0
padding-top:1.0em; pt1
padding-top:1.5em; pt15
padding-top:2.0em; pt2
padding-top:3.0em; pt3
padding-top:4.0em; pt4
padding-top:5.0em; pt5
text-align:center; ac center
text-align:justify; aj justify
text-align:left; al left
text-align:right; ar right
-------------------------------
text-indent:-10.0em; ti-10
text-indent:-9.5em; ti-9.5
text-indent:-9.0em; ti-9
text-indent:-8.5em; ti-8.5
text-indent:-8.0em; ti-8
text-indent:-7.5em; ti-7.5
text-indent:-7.0em; ti-7
text-indent:-6.5em; ti-6.5
text-indent:-6.0em; ti-6
text-indent:-5.5em; ti-5.5
text-indent:-5.0em; ti-5
text-indent:-4.5em; ti-4.5
text-indent:-4.0em; ti-4
text-indent:-3.5em; ti-3.5
text-indent:-3.0em; ti-3
text-indent:-2.5em; ti-2.5
text-indent:-2.0em; ti-2
text-indent:-1.5em; ti-1.5
text-indent:-1.0em; ti-1
text-indent:-0.5em; ti-.5
text-indent:0; ti0
text-indent:0.5em; ti.5
text-indent:1.0em; ti1
text-indent:1.5em; ti1.5
text-indent:2.0em; ti2
text-indent:2.5em; ti2.5
text-indent:3.0em; ti3
text-indent:3.5em; ti3.5
text-indent:4.0em; ti4
text-indent:4.5em; ti4.5
text-indent:5.0em; ti5
text-indent:5.5em; ti5.5
text-indent:6.0em; ti6
text-indent:6.5em; ti6.5
text-indent:7.0em; ti7
text-indent:7.5em; ti7.5
text-indent:8.0em; ti8
text-indent:8.5em; ti8.5
text-indent:9.0em; ti9
text-indent:9.5em; ti9.5
text-indent:10.0em; ti10
text-transform:capitalize; cap capitalize
text-transform:lowercase; lc lower case
text-transform:uppercase; uc upper case
vertical-align:baseline; vbs baseline
vertical-align:bottom; vbm bottom
vertical-align:middle; vmi middle
vertical-align:text-bottom; vtb text bottom Does not apply to table-cells[1]
vertical-align:text-top; vtt text top Does not apply to table-cells[2]
vertical-align:top; vtp top
white-space:nowrap; wnw nowrap ? ?
width:0%; w0 narrow
width:100%; wa full width
width:100em; w100
width:10%; w10
width:20%; w20 fifth
width:25%; w25 quarter
width:30%; w30 fifth
width:33%; w33 third
width:35%; w35
width:40%; w40 two fifths
width:45%; w45
width:50%; w50 half
width:55%; w55
width:60%; w60 three fifths
width:65%; w65
width:67%; w67 two thirds
width:70%; w70
width:75%; w75 three quarters
width:80%; w80 four fifths
width:85%; w85
width:90%; w90
width:95%; w95
width:0.5em; w0.5 width in em: shorthand using decimal point
width:1.0em; w1.0
width:1.5em; w1.5
width:2.0em; w2.0
width:2.5em; w2.5
width:3.0em; w3.0
width:3.5em; w3.5
width:4.0em; w4.0
width:4.5em; w4.5
width:5.0em; w5.0
width:5.5em; w5.5
width:6.0em; w6.0
width:6.5em; w6.5
width:7.0em; w7.0
width:7.5em; w7.5
width:8.0em; w8.0
width:8.5em; w8.5
width:9.0em; w9.0
width:9.5em; w9.5
width:10.0em; w10.0
width:11.0em; w11.0
width:12.0em; w12.0
width:13.0em; w13.0
width:14.0em; w14.0
width:15.0em; w15.0
width:16.0em; w16.0
width:17.0em; w17.0
width:18.0em; w18.0
width:19.0em; w19.0
width:20.0em; w20.0



Example

[编辑]
Shorthand codes only
代码 produces
{{ts|ar|ba|sc}}

style="text-align:right; border:1px solid black; font-variant:small-caps;"

{{ts|ar|vtb|pr2}}

style="text-align:right; vertical-align:top; padding-right:2.0em;"

Natural language code combined with shorthand code
代码 produces
{{ts|text-align:right;|pr2}}

style="text-align:right; padding-right:2.0em;"