【问题标题】:How to change the bullet point's color in HTML [duplicate]如何在 HTML 中更改项目符号点的颜色 [重复]
【发布时间】:2021-01-20 04:05:43
【问题描述】:

如何在 ul、li 上更改子弹的颜色。在 HTML 中。 例如* Toyota,表示我要更改颜色的星星。

【问题讨论】:

    标签: html


    【解决方案1】:

    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>
    

    【讨论】:

    • 该死,它成功了,非常感谢你,一整天都在尝试。
    猜你喜欢
    • 2014-11-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-06-07
    • 2016-07-13
    相关资源
    最近更新 更多