list-style
Baseline Widely available *
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
* Some parts of this feature may have varying levels of support.
list-style
CSS 属性是一个简写对属性集合,包括list-style-type
, list-style-image
, 和 list-style-position
。
概要
CSS list-style 属性是设置list-style-type
, list-style-image
和 list-style-position
的简写属性。
初始值 | 该简写所对应的每个属性:
|
---|---|
适用元素 | 列表项 |
是否是继承属性 | 是 |
计算值 | 该简写所对应的每个属性:
|
动画类型 | 该简写所对应的每个属性:
|
语法
值
以任何顺序接受一个,二个或者三个关键词
示例
HTML
html
List 1
- List Item1
- List Item2
- List Item3
List 2
- List Item A
- List Item B
- List Item C
CSS
css
.one {
list-style: circle;
}
.two {
list-style: square inside;
}
Result
规范
Specification |
---|
CSS Lists and Counters Module Level 3 # list-style-property |