参见英文答案 >
css – css coding that I have never seen5个
这是网页中的HTML代码:
这是网页中的HTML代码:
<div class="3u"> ... </div>
它以这种方式用css设计:
.\33 u,.\33 u\24,.\33 u\28 1\29,.\33 u\24\28 1\29 { width: 25%; clear: none; }
任何人都可以解释一下这是什么?
我熟悉CSS但不是这种类型!
解决方法
从技术上讲,您无法使用数字启动CSS选择器.但是,您可以使用转义字符来解决它看起来像.
Check this out.
Leading digits
If the first character of an identifier is numeric,you’ll need to
escape it based on its Unicode code point. For example,the code point
for the character 1 is U+0031,so you would escape it as \000031 or
\31 .Basically,to escape any numeric character,just prefix it with \3 and append a space character ( ). Yay Unicode!