How to colour the list-style-type auto-generated numbers?

前端 未结 9 1243
遥遥无期
遥遥无期 2020-12-05 07:03

I\'m using the following list:

  1. This is the first footnote...
  2. &
9条回答
  •  死守一世寂寞
    2020-12-05 07:46

    This simple CSS3 solution works in most browsers (IE8 and up):

    ul {
        padding-left: 14px;
        list-style: none;
    }
    ul li:before {
        color: #f90;
        content: "•";
        position: relative; 
        left: -7px;
        font-size: 18px;
        margin-left: -7px;
    }
    

    You may have to adjust the padding and margin values depending on your situation.

提交回复
热议问题