一个比较棒的html列表自定义方式

2018-08-13  本文已影响0人  BGBM

Q:怎么在网页中用 ol 标签 + css 做出如图所示的列表项?求解!

怎么在网页中用 ol 标签 + css 做出如图所示的列表项?求解!.jpg

A:如下所示

<!DOCTYPE>
<html>
<head>
    <style>
    ol {counter-reset:lt}
    li {list-style:none;}
    li::before{content:"("counter(lt)")"; counter-increment:lt 1; }
    </style>
</head>
<body>
<ol> 
    <li>新歌top100</li> 
    <li>新曲top500</li> 
    <li>中文金曲榜</li> 
</ol>
</body>
</html>

来源:https://zhidao.baidu.com/question/452557735.html
注意:有的浏览器估计不支持。

上一篇 下一篇

猜你喜欢

热点阅读