CSS属性 list-style-type 列表样式类型属性

说明

该CSS属性用来设定列表项标记(list-item marker)的类型。

值:disc | circle | square | decimal | lower-roman | upper-roman | lower-alpha | upper-alpha | none| inherit

可用值值的说明
disc缺省值。黑圆点。
circle空心圆点。
square小黑方块。
decimal数字排序。1, 2, 3, 4 依次类推。
lower-roman小写罗马字排序。i, ii, iii, iv 依次类推。
upper-roman大写罗马字排序。 I, II, III, IV 依次类推。
lower-alpha小写字母排序。 a, b, c, d 依次类推。
upper-alpha大写字母排序。 A, B, C, D 依次类推。
none无列表项标记。

如果所在列表项的 margin-left 值设为 0 时,list-style-type 属性值无效,不显示效果。margin 值至少设为 30 pt。

示例代码

.discul {list-style-type: disc}
.circleul {list-style-type: circle}
.squareul {list-style-type: square}
.noneul {list-style-type: none}
.decimalol {list-style-type: decimal}
.lromanol {list-style-type: lower-roman}

继承

适用于

所有符合 display:list-item 的元素。