How to automatically add » (») to
  • elements using CSS?
  • 后端 未结 2 800
    滥情空心
    滥情空心 2020-12-23 09:04

    I want to automatically add the HTML character » (») to the left of each li element.

    What would be the best practise?

    I w

    相关标签:
    2条回答
    • 2020-12-23 09:34

      I found the above answer didn't work for me, but the following does:

      li:before{
         content: "\00BB";
      }
      

      This uses the hexadecimal code for &raquo instead.

      A nice hexadecimal converter can be found here.

      Hope this helps someone :)

      0 讨论(0)
    • 2020-12-23 09:36

      If you don't want the arrows to appear as content then why not go for a css background?

      li { background: url("raquo.gif") no-repeat left center; }
      
      0 讨论(0)
    提交回复
    热议问题