Can I use CSS to add a bullet point to any element?

前端 未结 9 2113
名媛妹妹
名媛妹妹 2020-12-13 23:54

Pretty simple question, but I am not sure if it is possible. I want to add an image to act as a bullet in all

elements. I know I can achieve this b

相关标签:
9条回答
  • 2020-12-14 00:52

    list-style-type is reserved for ul only. You can use <h1 class="bullet"> with pseudo-element :before.

    0 讨论(0)
  • 2020-12-14 00:54

    Nope, list-style and list-style-image are only for ul and ol tags you'll have to get back to your first method or make something with js

    http://www.w3schools.com/css/css_list.asp http://www.w3schools.com/cssref/pr_list-style-type.asp

    0 讨论(0)
  • 2020-12-14 00:55

    Just use <p>&bull; </p>to create a dot in front of your word

    0 讨论(0)
提交回复
热议问题