代码改变世界

CSS学习总结系列8——CSS属性:列表、表格

2008-07-07 13:34  Register  阅读(272)  评论(0)    收藏  举报

CSS属性

  1. 列表(list)
  2. 表格(table)

列表(list)

编号 属性 含义 默认值 应用于 继承性 IE FF W3C
1 list-style 列表综合属性 见单个属性 display值list-item的元素 4 1 1
2 list-style-image 替换标记的图片属性 none display值list-item的元素 4 1 1
3 list-style-position 列表标记位置属性。 outside display值list-item的元素 4 1 1
4 list-style-type 列表项标记类型属性 disc display值list-item的元素 4 1 1
1.list-style
取值:[ <list-style-type> || <list-style-image> || <list-style-position> ] | inherit
说明:
2.list-style-image
取值: <uri> | none | inherit
3.list-style-position
取值: inside | outside | inherit
说明:
  • inside:列表项目标记放置在文本以内,且环绕文本根据标记对齐。
  • outside:默认。保持标记位于文本的左侧。列表项目标记放置在文本以外,且环绕文本不根据标记对齐。
4.list-style-type
取值:disc | circle | square | decimal | decimal-leading-zero | lower-roman | upper-roman | lower-greek | lower-latin | upper-latin | armenian | georgian | none | inherit
  • disc:实心圆。
  • circle:空心圆。
  • square:实心方块或空心方块。
  • decimal:0开头的数字。
  • lower-roman:小写罗马数字(i, ii, iii, iv, v, 等。)
  • upper-roman大写罗马数字(I, II, III, IV, V, 等。):
  • lower-greek:小写希腊字母(alpha, beta, gamma, 等。)
  • lower-latin:小写拉丁字母(a, b, c, d, e, 等。)
  • upper-latin:大写拉丁字母(A, B, C, D, E, 等。)
  • armenian:传统的亚美尼亚编号方式。
  • georgian:传统的乔治亚编号方式(an, ban, gan, 等。)

表格(table)

编号 属性 含义 默认值 应用于 继承性 IE W3C
1 border-collapse 合并边框属性 separate display值table或inline-table的元素 5 2
2 border-spacing 单元格边框距离属性。 0 display值table或inline-table的元素 2
3 caption-side 表格标题位置属性。 top display值table-caption的元素 2
4 empty-cells 空单元格显示属性。 show display值table-cell的元素 2
5 table-layout 布局算法属性。 auto display值table或inline-table的元素 5 2
1.border-collapse
取值:collapse | separate | inherit
说明:
2.border-spacing
取值: <length> <length>? | inherit
说明:
3.caption-side
取值:top | bottom
说明:
4.empty-cells
取值:show | hide | inherit
说明:
5.table-layout
取值:auto | fixed | inherit
说明: