via css书签,Unicode via CSS :before
可以將文章內(nèi)容翻譯成中文,廣告屏蔽插件可能會(huì)導(dǎo)致該功能失效(如失效,請(qǐng)關(guān)閉廣告屏蔽插件后再試):
問題:
I am using Font Awesome on my webpage and I want to display an icon inside the :before pseudo element.
According to the documentation/cheatsheet, I have to type ? to get this font, but it isn't working. I believe that is normal because HTML entities aren't supported in :before.
So I googled a bit and found out, that if you want to display HTML entities in :before, you have to use the escaped hex reference.
So I was searching for the hex reference to ? but I found nothing. I believe that is because these are "private use" values, whatever that means.
Is there any way to get it working in :before?
回答1:
The escaped hex reference of ? is \f066.
content: "\f066";
回答2:
In CSS, FontAwesome unicode works only when the correct font family is declared (version 4 or less):
總結(jié)
以上是生活随笔為你收集整理的via css书签,Unicode via CSS :before的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 2022年6月总结
- 下一篇: 这款加水印app你用过吗