切换搜索
搜索
切换菜单
notifications
切换个人菜单
查看“模板:Table/doc”的源代码
来自决策链云智库
更多操作
←
模板:Table/doc
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{Documentation subpage}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> == Usage == <code><nowiki>{{Table|</nowiki>''param1''|''param2''|''param3''|class=<nowiki>}}</nowiki></code> Use at the beginning of a table to assign the <code>wikitable</code> and other commonly used table CSS classes. With no parameters, the template outputs <code>class="wikitable"</code>. The ''param1'', ''param2'', and ''param3'' parameters can be any of the following options: ;Collapse options *'''<code>show</code>, <code>hidable</code>, <code>collapsible</code>, or <code>mw-collapsible</code>:''' Uses the <code>mw-collapsible</code> class to show a [hide] link to [[Help:Collapsing|collapse]] the table, but leaves the table uncollapsed by default *'''<code>hide</code>, <code>collapse</code>, <code>collapsed</code>, or <code>mw-collapsed</code>:''' Uses the <code>mw-collapsible collapsed</code> classes to make the table [[Help:Collapsing|collapsed]] with a [show] link to reveal the table. *'''<code>auto</code> or <code>autocollapse</code>:''' Uses the <code>mw-collapsible autocollapse</code> classes to make the table [[Help:Collapsing|collapsible]], but only collapse it if there are three or more collapsible tables on the page *'''<code>inner</code> or <code>innercollapse</code>:''' Uses the <code>mw-collapsible innercollapse</code> classes to make the table [[Help:Collapsing|collapsible]], but only collapse if the table is within a larger table with the <code>outercollapse</code> class. *'''<code>outer</code> or <code>outercollapse</code>:''' Uses the <code>outercollapse</code> class to collapse any smaller tables within the table it that use the <code>innercollapse</code> class. Can be combined with the various collapse and sort options above. ;Sort options *'''<code>sort</code> or <code>sortable</code>:''' Uses the <code>sortable</code> class to add [[Help:Sorting|sorting buttons]] to each column of the table. Can be combined with the various collapse options above or with <code>outercollapse</code>. ;Other options *Any other Wikipedia class may be specified using the {{para|class}} parameter. ; Up to three parameters can be used, plus the custom {{para|class}} parameter, and they can be specified in any order. ==Examples== ;With no parameters <syntaxhighlight lang="wikitext">{| {{Table}} ! Rows !! Data |- ! Row 1 | Datum1 |- ! Row 2 | Datum2 |}</syntaxhighlight> Uses <code>class="wikitable"</code> to produce {| {{Table}} ! Rows !! Data |- ! Row 1 | Datum1 |- ! Row 2 | Datum2 |} ;With parameters <syntaxhighlight lang="wikitext">{| {{Table|hide|sort}} ! Rows !! Data |- ! Row 1 | Datum1 |- ! Row 2 | Datum2 |}</syntaxhighlight> Uses <code>class="wikitable mw-collapsible mw-collapsed sortable"</code> to produce {| {{Table|hide|sort}} ! Rows !! Data |- ! Row 1 | Datum1 |- ! Row 2 | Datum2 |} ;With custom parameters <syntaxhighlight lang="wikitext">{| {{Table|sort|class=floatright}} ! Rows !! Data |- ! Row 1 | Datum1 |- ! Row 2 | Datum2 |}</syntaxhighlight> Uses <code>class="wikitable sortable floatright"</code> to produce: {| {{Table|sort|class=floatright}} ! Rows !! Data |- ! Row 1 | Datum1 |- ! Row 2 | Datum2 |} {{clear}} ==See also== *[[Help:Table]] *[[Help:Collapsing]] *[[Help:Sorting]] *{{tl|Wikitable}} <includeonly>{{sandbox other|| <!-- Categories below this line, please; interwikis at Wikidata --> [[Category:Table templates]] }}</includeonly>
本页使用的模板:
模板:Clear
(
查看源代码
)
模板:Documentation subpage
(
查看源代码
)
模板:Mbox
(
查看源代码
)
模板:Para
(
查看源代码
)
模板:Strong
(
查看源代码
)
模板:Table
(
查看源代码
)
模板:Terminate sentence
(
查看源代码
)
模板:Tl
(
查看源代码
)
模块:Arguments
(
查看源代码
)
模块:Message box
(
查看源代码
)
模块:Message box/configuration
(
查看源代码
)
模块:Message box/ombox.css
(
查看源代码
)
模块:Text
(
查看源代码
)
模块:Yesno
(
查看源代码
)
返回
模板:Table/doc
。