I need an unordered list without any bullets

后端 未结 14 1511
清酒与你
清酒与你 2020-11-22 07:16

I have created an unordered list. I feel the bullets in the unordered list are bothersome, so I want to remove them.

Is it possible to have a list without bullets?<

14条回答
  •  梦如初夏
    2020-11-22 07:56

    I used list-style on both the ul and the li to remove the bullets. I wanted to replace the bullets with a custom character, in this case a 'dash'. That gives a nicely indented effect that works fine when the text wraps.

    ul.dashed-list {
        list-style: none outside none;
    }
    
    ul.dashed-list li:before {
        content: "\2014";
        float: left;
        margin: 0 0 0 -27px;
        padding: 0;
    }
    
    ul.dashed-list li {
        list-style-type: none;
    }
    • text
    • text

提交回复
热议问题