CSS选择器中的特殊字符 [英] Special characters in CSS selectors

查看:167
本文介绍了CSS选择器中的特殊字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这些是什么?

推荐答案


在CSS中,标识符(包括元素
名称,类和ID)
只能包含字符
[a-zA-Z0-9]和ISO 10646字符
U + 00A1及以上,加上连字符( - )
和下划线(_);他们不能
以数字开头,或者连字符
后面跟一个数字。标识符可以
也包含转义字符和
任何ISO 10646字符作为数字
代码(见下一项).code(见下一项)。

In CSS, identifiers (including element names, classes, and IDs in selectors) can contain only the characters [a-zA-Z0-9] and ISO 10646 characters U+00A1 and higher, plus the hyphen (-) and the underscore (_); they cannot start with a digit, or a hyphen followed by a digit. Identifiers can also contain escaped characters and any ISO 10646 character as a numeric code (see next item).code (see next item).

http:// www。 w3.org/TR/CSS21/syndata.html#characters

这篇关于CSS选择器中的特殊字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆