列表和计数器
list-style 属性
基础
作用
- 设置 list 样式;
.one {
list-style: circle;
}
.two {
list-style: square inside;
}
成分属性
- list-style-image 属性;
- list-style-position 属性;
- list-style-type 属性;
简写机制
- 随便写;
list-style-type 属性
作用
- 设置列表标号样式;
ol.normal {
list-style-type: disc;
}
属性值
none
- 无列表标号;
disc
- 实心圆;
circle
- 空心圆;
square
- 实心方块;
decimal
- 十进制数字;
- 起始值为 1;
string 类型
- 字符串;
list-style-position 属性
作用
- 设置列表标号位置;
ol.normal {
list-style-position: inside;
}
属性值
inside
- 列表标号在列表内容里;
outside
- 列表标号在列表内容外;
list-style-image
作用
- 修改列表标号为图片;
ol.normal {
list-style-image: none;
}
属性值
none
- 无图片;
- 使用 list-style-type;
image 类型
- 不作详述;