Adding HTML entities using CSS content

后端 未结 9 1228
长情又很酷
长情又很酷 2020-11-22 06:57

How do you use the CSS content property to add HTML entities?

Using something like this just prints  

9条回答
  •  無奈伤痛
    2020-11-22 07:30

    There is a way to paste an nbsp - open CharMap and copy character 160. However, in this case I'd probably space it out with padding, like this:

    .breadcrumbs a:before { content: '>'; padding-right: .5em; }
    

    You might need to set the breadcrumbs display:inline-block or something, though.

提交回复
热议问题