代码测试,存为html文件,打开可以看到效果ul.circle {list-style-type:circle}ul.square {list-style-type:square}ol.upper-roman {list-style-type:upper-roman}ol.lower-alpha {list-style-type:lower-alpha}Type circle:
CSS ul标签如何实现序号下面出现下划线
list-style-type:circle; 圆
list-style-type:square; 方形
代码测试,存为html文件,打开可以看到效果<html><head><style type="text/css">ul.circle {list-style-type:circle}ul.square {list-style-type:square}ol.upper-roman {list-style-type:upper-roman}ol.lower-alpha {list-style-type:lower-alpha}</style></head><body><p>Type circle:</p><ul class="circle"><li>Coffee</li><li>Tea</li><li>Coca Cola</li></ul><p>Type square:</p><ul class="square"><li>Coffee</li><li>Tea</li><li>Coca Cola</li></ul><p>Type upper-roman:</p><ol class="upper-roman"><li>Coffee</li><li>Tea</li><li>Coca Cola</li></ol><p>Type lower-alpha:</p><ol class="lower-alpha"><li>Coffee</li><li>Tea</li><li>Coca Cola</li></ol></body></html>2019-02-22
在<style>标签里的<li>里添加list-style-postition:inside;就行了2020-08-13