css - How to adjust the style of the tag in front of ul ol
大家讲道理
大家讲道理 2017-05-16 13:22:24
0
3
763

Encountered such a situation; if you are using the bootstrap framework for development.
Excuse me: How should I write it? Please give me some ideas. (It’s best to use bootstrap if it can be used, but it doesn’t matter if it can’t be used)
As shown in the picture:

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(3)
我想大声告诉你

https://codepen.io/HaoyCn/pen...

滿天的星座

list-style-image can be implemented and icon font can be implemented

刘奇

It is recommended not to use list-style. It is best to customize the style, add a background color to the li tag, add rounded edges, and then customize the colors for the first three

Final effect:

css code

   <style>
    li {
        list-style: none;
        width: 20px;
        text-align: center;
        margin: 10px 0;
        border-radius: 4px;
        color: #fff;
        background-color: #ccc;
    }
    .one{
        background-color: red;
    }
    .two{
        background-color: green;
    }
    .three{
        background-color: orange;
    }
    </style>

HTML

    <ul>
        <li class="one">1</li>
        <li class="two">2</li>
        <li class="three">3</li>
        <li>4</li>
        <li>5</li>
        <li>6</li>
        <li>7</li>
        <li>8</li>
        <li>9</li>
        <li>10</li>
    </ul>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template