用户定义 | custom-ident (Lists & Counters) - CSS 中文开发手册 - Break易站
2021-01-27 08:14
用户定义 | custom-ident (Lists & Counters) - CSS 中文开发手册
句法
其语法
任何字母字符‘A‘到‘Z‘,或‘a‘到‘z‘,任何十进制数字‘0‘到‘9‘,连字符‘-‘,下划线‘_‘,一个带有反斜杠的转义字符‘\‘,或一个Unicode字符(格式为反斜杠,后面跟着一到六个十六进制数字,表示其Unicode码位)。
第一个字符不能是十进制数字,也不能是破折号(‘-‘),后面跟十进制数字或其他短划线。甲
需要注意的是id1,Id1,iD1和ID1都是不同的标识符,因为它们区分大小写。另一方面,由于有几种逃避角色的方法,toto\?并且toto\3F是相同的标识符。
禁忌值
为了防止歧义,每个属性使用
animation-name全局禁止CSS值(unset,,initial和inherit),以及none。counter-resetcounter-increment禁止全球CSS值(unset,,initial和inherit),以及none。@counter-stylelist-style-type禁止全局CSS值(unset,initial,和inherit),以及价值观none,inline和outside。此外,相当多的预设值是由不同的浏览器中实现:disc,circle,square,decimal,cjk-decimal,decimal-leading-zero,lower-roman,upper-roman,lower-greek,lower-alpha,lower-latin,upper-alpha,upper-latin,arabic-indic,armenian,bengali,cambodian,cjk-earthly-branch,cjk-heavenly-stem,cjk-ideographic,devanagari,ethiopic-numeric,georgian,gujarati,gurmukhi,hebrew,hiragana,hiragana-iroha,japanese-formal,japanese-informal,kannada,katakana,katakana-iroha,khmer,korean-hangul-formal,korean-hanja-formal,korean-hanja-informal,lao,lower-armenian,malayalam,mongolian,myanmar,oriya,persian,simp-chinese-formal,simp-chinese-informal,tamil,telugu,thai,tibetan,trad-chinese-formal,trad-chinese-informal,upper-armenian,disclosure-open,和disclosure-close。grid-row-start
grid-row-end
grid-column-start
grid-column-end禁止span价值。will-change禁止全局CSS值(unset,initial,和inherit),以及价值观will-change,auto,scroll-position,和contents。
实例
有效标识符
nono79 A mix of alphanumeric characters and numbers ground-level A mix of alphanumeric characters and a dash -test A dash followed by alphanumeric characters _internal An underscore followed by alphanumeric characters toto A Unicode character followed by a sequence of alphanumeric characters bili\.bob A correctly escaped period
无效标识符
34rem It must not start with a decimal digit. -12rad It must not start with a dash followed by a decimal digit. bili.bob Only alphanumeric characters, _, and - needn‘t be escaped. --toto It must not start with two dashes. This would be a custom property. ‘bilibob‘ This would be a. "bilibob" This would be a .
规格
Specification | Status | Comment |
---|---|---|
CSS Will Change Module Level 1The definition of ‘ | Working Draft | Defines which values are excluded for will-change. |
CSS Counter Styles Level 3The definition of ‘ | Candidate Recommendation | Uses |
CSS Lists and Counters Module Level 3The definition of ‘ | Working Draft | Renames |
CSS AnimationsThe definition of ‘ | Working Draft | Defines which values are excluded for animation-name. |
CSS Values and Units Module Level 3The definition of ‘ | Candidate Recommendation | Renames |
CSS Level 2 (Revision 1)The definition of ‘ | Recommendation | Initial definition. |
浏览器兼容性
上一篇:相抵距离 | offset-distance (Motion Path) - CSS 中文开发手册 - Break易站
下一篇:添加符号 | @counter-style.additive-symbols (Counter Styles) - CSS 中文开发手册 - Break易站
文章标题:用户定义 | custom-ident (Lists & Counters) - CSS 中文开发手册 - Break易站
文章链接:http://soscw.com/index.php/essay/47667.html