编辑“︁
Template:Vertical header/doc
”︁
跳转到导航
跳转到搜索
这是
Vertical header
模板的
文档页面
。
警告:
您没有登录。如果您进行任何编辑,您的IP地址会公开展示。如果您
登录
或
创建账号
,您的编辑会以您的用户名署名,此外还有其他益处。
反垃圾检查。
不要
加入这个!
{{NoteTA/MediaWiki}}{{Documentation subpage}}<!-- 在本行下編輯模板說明 --> {{lua|Module:Vertical header}} {| class="wikitable" style="float: right;" ! {{vert header|stp=1|Regular column}} ! {{vert header|stp=1|Vertical value column}} ! {{vert header|stp=1|nb=1|cellstyle=background-color:gold|Thin gold column}} ! {{vert header|nb=1|Unsortable column}} |- | 0 || {{vert header|va=middle|1}} || 1 || 2 |- | 3 || {{vert header|va=middle|5}} || 8 || 13 |- ! {{vert header|va=top|Regular column}} ! {{vert header|va=top|Vertical value column}} ! {{vert header|nb=1|va=top|cellstyle=background-color:gold|Thin gold column}} ! {{vert header|nb=1|va=top|Unsortable column}} |} == 概要 == This is a template that helps create vertically-oriented column headers in tables. It even works for [[Help:Sorting|sortable]] columns. Although this template was made with table headers in mind, it can work with regular cells as well. If the header cells have other attributes, for example [[Help:Table#Combined use of COLSPAN and ROWSPAN|<code>colspan</code> or <code>rowspan</code>]], there must be no vertical bar <code>|</code> between the attributes and the template call. == 參數及使用方法 == * <tt>1</tt> — The desired text; can contain wikilinks (<code>[[]]</code>). You can escape the equals sign either by using {{tlx|1==}} or by explicitly mentioning the <code>|1=</code> parameter. * <tt>nb</tt> — Give any non-empty value in order to apply a {{tlx|nobold}} template to the text. * <tt>va</tt> — Vertical alignment (<code>bottom</code>, <code>top</code>, <code>middle</code>). Default is <code>bottom</code>. * <tt>stp</tt> — Give any non-empty value in order to apply a top padding to the cell (useful if the header is bottom-aligned; '''required for sortable columns'''). * <tt>mw</tt> — Manual width; override the default value, which was automatically generated based on the number of line breaks (you can use <code><br></code>, <code><BR /></code> or any other combination). * <tt>style</tt> — Additional styles for the <code><div/></code> containing the rotated text. May contain double quotes. * <tt>cellstyle</tt> — Additional styles for the entire cell. May contain double quotes. '''Use this instead of the cell's <code>style</code> attribute.''' Use <code>background-color</code> instead of <code>background</code> if you need it for the header of a sortable column. == 範例 == * <code><nowiki>! {{vert header|Your text here}}</nowiki></code> — basic example * <code><nowiki>! {{vert header|nb=1|stp=1|Your text here}}</nowiki></code> — produces an explicitly sortable, no-bold, sortable header * <code><nowiki>! {{vert header|va=top|Your text here}}</nowiki></code> — produces an unsortable, top-aligned table header * <code><nowiki>! colspan="2" {{vert header|cellstyle=background-color:gold|Your text here}}</nowiki></code> — produces an unsortable header spanning two columns, with a gold background; use no vertical bar after <code>colspan</code> You can also use the <code><nowiki>! {{verth|Your text here}}</nowiki></code> shorthand. An example below (from [[Help:Sorting]]) with headers that span rows or columns (using ''rowspan'' and ''colspan''). '''Note''' that there is no vertical bar <code>|</code> between <code>rowspan=2</code> and <code>{{vert header</code> {| |- style=vertical-align:top; | {| class="wikitable sortable" |- ! rowspan=2 {{vert header|stp=1|name}} ! colspan=2 {{vert header|data columns}} ! rowspan=2 {{vert header|stp=1|another column}} |- ! {{vert header|stp=1|data}} ! {{vert header|stp=1|more data}} |- | cats | 273 | 53 | 1 |- | dogs | 65 | 8,492 | 2 |- | mice | 1,649 | 548 | 3 |} | <pre> {| class="wikitable sortable" |- ! rowspan=2 {{vert header|stp=1|name}} ! colspan=2 {{vert header|data columns}} ! rowspan=2 {{vert header|stp=1|another column}} |- ! {{vert header|stp=1|data}} ! {{vert header|stp=1|more data}} |- | cats | 273 | 53 | 1 |- | dogs | 65 | 8,492 | 2 |- | mice | 1,649 | 548 | 3 |} </pre> |} == 兼容性 == The following browsers have been tested on combinations of Debian 6.0, Mac OS X 10.8, Ubuntu 9.10, Ubuntu 15.04, Windows 7, Windows Server 2008 R2 and Windows 10. The earliest version known to work is highlighted in green. The latest tested configuration that did not work is highlighted in red. {|class="wikitable" |-style="font-size:80%" ! Arora ! Chrome ! Dillo ! Edge ! Epiphany ! Firefox ! Iceape ! Iceweasel ! IE ! Konqueror ! Luakit ! Midori ! Opera ! Rekonq ! Safari ! SeaMonkey |-style="line-height:100%" | {{yes|0.11}}<br>{{font|size=80%|27 Sep 10}} | {{yes|9<br>{{font|size=80%|4 Feb 11}}}} | {{no|3.0.4<br>{{font|size=80%|9 Apr 14}}}} | {{yes|38<br>{{font|size=80%|2 Aug 16}}}} | {{yes|3.4.2<br>{{font|size=80%|19 May 12}}}} | {{yes|43<br>{{font|size=80%|15 Dec 15}}}} | {{no|2.7.12<br>{{font|size=80%|19 Jan 13}}}} | {{yes|38.6<br>{{font|size=80%|11 Feb 16}}}} | {{yes|11<br>{{font|size=80%|17 Oct 13}}}} | {{yes|4.14<br>{{font|size=80%|20 Aug 14}}}} | {{yes|039e319<br>{{font|size=80%|13 Sep 12}}}} | {{yes|0.4.3<br>{{font|size=80%|6 Nov 14}}}} | {{yes|15<br>{{font|size=80%|2 Jul 13}}}} | {{yes|1.1<br>{{font|size=80%|27 Aug 12}}}} | {{yes|9.1<br>{{font|size=80%|21 Mar 16}}}} | {{yes|2.46<br>{{font|size=80%|22 Dec 16}}}} |-style="font-size:80%;text-align:center" | Deb 6 | Win 7 | Ubu 15.04 | Win 10 | Deb 6 | OS X 10.8 | Deb 6 | Deb 6 | Win 10 | Ubu 15.04 | Ubu 15.04 | Ubu 15.04 | Win 2008 R2 | Ubu 9.10 | OS X 10.8 | Ubu 15.04 |} ; Should theoretically work on the following browsers as well (please confirm)<nowiki>:</nowiki> {|class="wikitable" style="text-align:center" |-style="font-size:80%" ! Android<br>Browser ! Chrome ! Edge ! Firefox ! Safari |-style="line-height:100%" | 3<br>{{font|size=80%|22 Feb 11}} | 8<br>{{font|size=80%|2 Dec 10}} | 20<br>{{font|size=80%|29 Jul 15}} | 41<br>{{font|size=80%|22 Sep 15}} | 5.1<br>{{font|size=80%|20 Jul 11}} |} ; Notes<nowiki>:</nowiki> * In Internet Explorer 5–10, the text goes from top to bottom instead of going from bottom to top. * Firefox support for vertical text and rotation began in version 25, but it was unstable until version 43, or possibly 41. <includeonly>{{Sandbox other||<!-- 本行下加入模板的分類 --> [[Category:Table cell templates]] }}</includeonly>
摘要:
请注意,所有对Local Chinese Wikipedia的贡献均可能会被其他贡献者编辑、修改或删除。如果您不希望您的文字作品被随意编辑,请不要在此提交。
您同时也向我们承诺,您提交的内容为您自己所创作,或是复制自公共领域或类似自由来源(详情请见
Project:著作权
)。
未经许可,请勿提交受著作权保护的作品!
取消
编辑帮助
(在新窗口中打开)
导航菜单
个人工具
未登录
讨论
贡献
创建账号
登录
命名空间
模板
讨论
大陆简体
不转换
简体
繁體
大陆简体
香港繁體
澳門繁體
大马简体
新加坡简体
臺灣正體
查看
阅读
编辑
查看历史
更多
搜索
导航
首页
最近更改
随机页面
MediaWiki帮助
工具
链入页面
相关更改
特殊页面
页面信息