可以在 css 内容伪元素中添加非拉丁字符吗?
It is possible to add non-latin characters in css content pseudo-element?
可以在css "content"伪元素中添加非拉丁字符吗?
我有这样的代码:
&::after{
content:"(לחץ לחיוג)";
color: #00b1eb;
text-decoration: underline;
font-family: "Open Sans", "Narkis Block M F" !important;
font-size: 32px;
}
在浏览器上我得到了这个乱码:
如果content:中的字符串是英文就可以了:
有没有办法在内容伪元素中添加希伯来语或非英语字符?
您可以使用 unicode 序列打印 non-latin 符号,就像这样 codepen example
例如
body::before {
content:"(DCD7E5 DCD7D9D5D2)";
}
(我使用 this tool 将您的字符转换为 UTF-8 单位)
可以在css "content"伪元素中添加非拉丁字符吗?
我有这样的代码:
&::after{
content:"(לחץ לחיוג)";
color: #00b1eb;
text-decoration: underline;
font-family: "Open Sans", "Narkis Block M F" !important;
font-size: 32px;
}
在浏览器上我得到了这个乱码:
如果content:中的字符串是英文就可以了:
有没有办法在内容伪元素中添加希伯来语或非英语字符?
您可以使用 unicode 序列打印 non-latin 符号,就像这样 codepen example
例如
body::before {
content:"(DCD7E5 DCD7D9D5D2)";
}
(我使用 this tool 将您的字符转换为 UTF-8 单位)