list-style:none;
list-style-type:
decimal(1. 2. ...)
decimal-leading-zero(01. 02. ...)
upper-alpha(A. B. ...)
lower-alpha(a. b. ...)
upper-roman(I. II. ...)
lower-roman(i. ii. ...);
四、設(shè)置裝飾列表符號位置
list-style-position:outside(默認(rèn))/inside
![]()
list-style-position:outside list-style-position:inside
五、設(shè)置裝飾列表符號顏色 1、<ul>設(shè)置符號顏色:
ul li{ width: 200px; list-style-type: none; list-style-position:outside ;}ul li:before{ content:counter(item,disc) ' '; color: red;}
2、<ol>設(shè)置符號顏色:ol li{ width: 200px; list-style-type: none; list-style-position:outside ; counter-increment:item ;}ol li:before{ content:counter(item) '. '; color: red;}
!效果為list-style-position:inside,就算設(shè)置list-style-position:outside也無法改變
六、設(shè)置裝飾列表符號圖形
list-style-image:url(xxx.xxx);
七、裝飾列表簡寫
list-style:list-style-type list-style-image list-style-position;
例如:
list-style:circle url(img/bullet.gif) inside;
新聞熱點(diǎn)
疑難解答