[英]Special Characters “>” not displaying by using UTF-8
Here are my codes below: 以下是我的代码:
ul.pathnav a:before{
content:"\0X3E";
text-decoration:none;
}
\\0x3e is the hex for ">", but it doesn't work. \\ 0x3e是“>”的十六进制,但它不起作用。 I tried another special character, it works just fine. 我尝试了另一个特殊角色,它运作得很好。 For example: in downwards filled triangle, which hex code is \\25BC. 例如:在向下填充的三角形中,十六进制代码是\\ 25BC。
Not quite sure what should I add. 不太清楚我应该添加什么。 In the header the code is: 在标题中代码是:
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
The character escape syntax in CSS uses just the backslash \\
followed by hexadecimal digits and possibly a whitespace character. CSS中的字符转义语法只使用反斜杠\\
后跟十六进制数字,可能还有空格字符。 An X
is neither needed nor allowed here. 这里既不需要也不允许使用X
So a proper syntax using an escape would be 因此使用转义的正确语法将是
content: "\3E";
On the other hand, there is no need to escape the GREATER THAN character >
in a CSS string, so you can write just 另一方面,没有必要在CSS字符串中转义GREATER THAN字符>
,所以你可以只写
content: ">";
content:"\0X3E";
should be written as 应该写成
content:"\03e";
http://www.fileformat.info/info/unicode/char/3e/index.htm http://www.fileformat.info/info/unicode/char/3e/index.htm
page for ">" character “>”字符的页面
Use \\3E
instead of \\0X3E
使用\\3E
而不是\\0X3E
Demo: http://jsfiddle.net/nDc3K/ 演示: http : //jsfiddle.net/nDc3K/
p:before {
content:"\3E";
text-decoration:none;
}
/\\ / \\
<p>Test</p>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.