The Underscore Hack
- The underscore ("_") is allowed in CSS identifiers by the CSS2.1 Specification
- Browsers have to ignore unknown CSS properties
- MSIE 5+ for Windows ignores the "_" at the beginning of any CSS property name
_color:red
is:- Correct, for CSS 2.1 specification allows it (even if software validators, knowing only older version CSS 2.0, say it's a bug: they are wrong, it's correct).
- Ignored in any browser but WinIE
- Treated as
color:red
in WinIE
Nhận xét
Đăng nhận xét