li:before{ content: “■”; } How to Encode this Special Character as a Bullit in an Email Stationery?

前端 未结 6 1310
小鲜肉
小鲜肉 2021-01-30 04:00

After proudly coloring my liststyle bullet without any image url or span tags, via:

ul{ list-style: none; padding:0;  margin:0;  }
li{ padding-left: 1em; text-in         


        
6条回答
  •  清歌不尽
    2021-01-30 04:20

    Never faced this problem before (not worked much on email, I avoid it like the plague) but you could try declaring the bullet with the unicode code point (different notation for CSS than for HTML): content: '\2022'. (you need to use the hex number, not the 8226 decimal one)

    Then, in case you use something that picks up those characters and HTML-encodes them into entities (which won't work for CSS strings), I guess it will ignore that.

提交回复
热议问题