这是个奇怪的问题,但我想在CSS中匹配 Select 器属性中的Unicode字符
我觉得一个例子胜过千言万语:
在下面的示例中,最后4个 Select 器不起作用
input {
width: 50px;
height: 50px;
background-color: red;
}
/* writing the unicode char is of
course working, but I don't want to past complexe
unicode char in my css */
[value="a"] {
background-color: pink;
}
/* html notation */
[value="a"],
/* unicode notation */
[value="U+F52A"],
/* css content notation */
[value="\97"],
/* js notation */
[value="\u97"] {
background-color: blue;
}
<input value="a">