在无序列表ul>li中,无线列表的标志是出现在各列表前面的圆点。在有序列表ol>li中,前面默认带有数字,如何修改列表前面的项目符号,只需要通过list-style调整就好,常见的符号有()list-style-type:circle;list-style:none;list-style:square;list-style:upper-roman;list-style:lower-alpha;等!
代码如下所示:
css如何玩转有序无序列表项list样式
ul.box1{
list-style-type:circle;
}
.box1 li{
list-style:none;
background-image: url("https://pic.cnblogs.com/avatar/1350951/20200208114706.png");
height: 50px;
background-repeat: no-repeat;
background-size: 20px;
padding: 0px 25px 10px;
}
ul.box2{
list-style:square;
}
ul.box3{
list-style:upper-roman;
}
ul.box4{
list-style:lower-alpha;
}
ol.box5{
list-style: none;
list-style:upper-alpha;
color: indianred;
}
- abc
- abc
- abc
- abc
- abc
- abc
- abc
- abc
- abc
- abc
- abc
- abc
- abc
- abc
- abc
- abc
- abc
- abc
- abc
- abc
- abc
- abc
- abc
- abc
- abc
总结
样式所述是小编给大家介绍的css中有序无序列表项list样式设置方法,希望对大家有所帮助!



