Welcome
访客
, you are in:
<root>
•
登录
Supesoft Wiki
导航条
¶
首页
随机选择页
创建新页面
所有页面
文档分类
系统管理员
文件管理
登陆/退出
语言选择
链接
¶
Supesoft
ASP.NET权限管理系统(FrameWork)
广告统计分析系统(ADCount)
官方论坛
快速搜索
»
高级搜索 »
后退
Wiki 表格编辑
修改于 2010/03/28 17:59
由
Administrator
归类为
Wiki帮助
((('''注意''':本文档为官方帮助文档的中文翻译版本,原英文版地址为 [http://www.screwturn.eu/Tables.ashx]。))) '''[http://www.screwturn.eu/Wiki.ashx|ScrewTurn Wiki]''' 中使用 ''WikiMarkup'' 来支持表格,使用了一个众所周知的语法。插入表格是很简单的,但也可以修改表格的外观。 {TOC} ==1 - 基本表格== 一个简单的表格由行序列组成,每行又包含了一些单元格。 {{{{<nowiki>{| | Cell 1.1 | Cell 1.2 |- | Cell 2.1 | Cell 2.2 |}</nowiki>}}}} 的结果是: {| | Cell 1.1 | Cell 1.2 |- | Cell 2.1 | Cell 2.2 |} 依赖于所使用的主题,表格的外观可能不同。{BR} 同样的结果还可以由下列的形式得到 {{{{<nowiki>{| | Cell 1.1 || Cell 1.2 |- | Cell 2.1 || Cell 2.2 |}</nowiki>}}}} 正如你如看到的,表格以 {{{|}} 开始,并以 {{|}}}结束。单竖线开始表格的单元格,而竖线后面跟一个连字符 ({{|-}}) 开始表格中的新行。二个竖线分隔二个或多个在同一行中的单元格。 ==2 - 高级选项== 表格可以有一个标题,可以用一个竖线和加号来紧跟在开始标记后指定它。 {{{{<nowiki>{| |+ This is a Table | Cell 1.1 || Cell 1.2 |- | Cell 2.1 || Cell 2.2 |}</nowiki>}}}} 结果是: {| |+ This is a Table | Cell 1.1 || Cell 1.2 |- | Cell 2.1 || Cell 2.2 |} 也可以使用行和单元格表头,它们用感叹号来标识。 {{{{<nowiki>{| ! Cells x.1 !! Cells x.2 |- | Cell 1.1 || Cell 1.2 |- | Cell 2.1 || Cell 2.2 |}</nowiki>}}}} 生成: {| ! Cells x.1 !! Cells x.2 |- | Cell 1.1 || Cell 1.2 |- | Cell 2.1 || Cell 2.2 |} 也可以使用行头。 {{{{<nowiki>{| ! X !! x.1 !! x.2 |- ! 1.x | Cell 1.1 || Cell 1.2 |- ! 2.x | Cell 2.1 || Cell 2.2 |}</nowiki>}}}} 生成: {| ! X !! x.1 !! x.2 |- ! 1.x | Cell 1.1 || Cell 1.2 |- ! 2.x | Cell 2.1 || Cell 2.2 |} ==3 - 表格外观== 也可以使用 XHTML 标记来修改表格(每行或单元格)的外观。 {{{{<nowiki>{| border="1" bgcolor="Gray" | Cell 1.1 || Cell 1.2 |- | Cell 2.1 || Cell 2.2 |}</nowiki>}}}} 生成 {| border="1" bgcolor="#CCCCCC" | Cell 1.1 || Cell 1.2 |- | Cell 2.1 || Cell 2.2 |} 也可以修改单独的行的外观。在这种情况下,可以手工添加一个尾行分隔( a trailing row separator )。 {{{{<nowiki>{| cellspacing="0" cellpadding="2" border="1" |- style="background-color: Red; color: White;" | Cell 1.1 || Cell 1.2 |- style="font-weight: bold;" | Cell 2.1 || Cell 2.2 |}</nowiki>}}}} 结果是 {| cellspacing="0" cellpadding="2" border="1" |- style="background-color: Red; color: White;" | Cell 1.1 || Cell 1.2 |- style="font-weight: bold;" | Cell 2.1 || Cell 2.2 |} 每个单独的单元格也可以被''样式化''。 {{{{<nowiki>{| | bgcolor="Blue" | Styled Cell | Normal cell |- | Normal cell | bgcolor="Yellow" | Styled cell |}</nowiki>}}}} {| | bgcolor="Blue" | Styled Cell | Normal cell |- | Normal cell | bgcolor="Yellow" | Styled cell |} ==4 - 合并单元格== 可以使用 XHTML 属性来合并二个或多个单元格 (水平或垂直方向上的)。{BR} '''注意''':不是所有的浏览器都支持这种特性。 {{{{<nowiki>{| | colspan="2" bgcolor="Red" | Cell |- | Cell || Cell |}</nowiki>}}}} 生成 {| | colspan="2" bgcolor="Red" | Cell |- | Cell || Cell |} 而 {{{{<nowiki>{| | rowspan="2" bgcolor="Red" | Cell | Cell |- | Cell |}</nowiki>}}}} 的结果是 {| | rowspan="2" bgcolor="Red" | Cell | Cell |- | Cell |} ==5 - 对齐方式== 可将表格对齐到右边,也可以把它放在页面中中间。 {{{{<nowiki>{| align="right" border="1" | Cell || Cell |}</nowiki>}}}} 生成 {| align="right" border="1" | Cell || Cell |} 而 {{{{<nowiki>{| style="margin: 0px auto;" border="1" | Cell || Cell |}</nowiki>}}}} 的结果是 {| style="margin: 0px auto;" border="1" | Cell || Cell |} ==6 - 全部放在一起== {{{{<nowiki>{| cellspacing="0" cellpadding="2" style="background-color: #EEEEEE;" |+ Styled Table |- style="background-color: #990000; color: #FFFFFF;" | This is a cell || This is a cell || This is a cell |- | style="background-color: #000000; color: #CCCCCC;" | Styled cell | style="border: solid 1px #FF0000;" | Styled cell | '''Normal cell''' |- | Normal || Normal || [Download] |}</nowiki>}}}} 生成 {| cellspacing="0" cellpadding="2" style="background-color: #EEEEEE;" |+ Styled Table |- style="background-color: #990000; color: #FFFFFF;" | This is a cell || This is a cell || This is a cell |- | style="background-color: #000000; color: #CCCCCC;" | Styled cell | style="border: solid 1px #FF0000;" | Styled cell | '''Normal cell''' |- | Normal || Normal || [Download] |}
Meta Keywords:
Meta Description:
Change Comment:
ScrewTurn Wiki
version 3.0.2.509. Some of the icons created by
FamFamFam
.