【发布时间】:2021-01-20 04:05:43
【问题描述】:
如何在 ul、li 上更改子弹的颜色。在 HTML 中。
例如* Toyota,表示我要更改颜色的星星。
【问题讨论】:
标签: html
如何在 ul、li 上更改子弹的颜色。在 HTML 中。
例如* Toyota,表示我要更改颜色的星星。
【问题讨论】:
标签: html
ul {
list-style: none;
}
ul li::before {
content: "*";
color: red; /*What color you want change here*/
font-weight: bold;
display: inline-block;
width: 1em;
margin-left: -1em;
}
<ul>
<li>Hello</li>
</ul>
试试这个.....!
<style>
ul {
list-style: none;
}
ul li::before {
content: "*";
color: red;
font-weight: bold;
display: inline-block;
width: 1em;
margin-left: -1em;
}
</style>
【讨论】: