How To Add List-style-type: “disc” to <p> tag

匿名 (未验证) 提交于 2019-12-03 01:49:02

问题:

This seems like it ought to be ridiculously easy, but I'm having trouble figuring it out.

I want to replicate the

  • function so the disc image appears to the left, but applied to a

    tag

    I have this, but it does not show the disc image.

    .list {      margin-top: 15px;      margin-bottom: 15px;      list-style:disc outside none;      display:inline;       }  

    And Much, Much More!

    I want to avoid using any graphics to simulate the bullet if at all possible.
    Thanks for the help

    回答1:

    Answer: display: list-item;

    Display must be set to list-item - not inline, and not list!

    .list {      list-style:disc outside none;      display:list-item;       }  

    And Much, Much More!



    回答2:

    Well, a p is not a list. Why not use

    ?

    [edit] Let me elaborate. The problem is that you set this style on a list, while the disc is shown in the list items. A p has no items in that sense, so there's nothing to apply the disc to.



    标签
    易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
    该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!