CSS中如何更改有序列表属性在HTML中,有序列表通常由``标签和``标签组成。默认情况下,有序列表的样式由浏览器决定,但是我们可以使用CSS更改它们的样式。下面介绍几种方法。1. 使用liststy...
CSS中如何更改有序列表属性
在HTML中,有序列表通常由`
html
<ol>
<li>第一项</li>
<li>第二项</li>
<li>第三项</li>
</ol>
css
ol {
list-style-type: decimal; /* 1, 2, 3, ... */
/* list-style-type: lower-alpha; 小写字母:a, b, c, ... */
/* list-style-type: upper-roman; 大写罗马数字:I, II, III, ... */
}
css
ol {
list-style-position: inside; /* 列表项标记位于列表项文本的左侧 */
/* list-style-position: outside; 列表项标记位于列表项文本的左侧之外 */
}
css
ol {
list-style-image: url("bullet.gif");
}