The Underscore Hack

  1. The underscore ("_") is allowed in CSS identifiers by the CSS2.1 Specification
  2. Browsers have to ignore unknown CSS properties
  3. MSIE 5+ for Windows ignores the "_" at the beginning of any CSS property name
Therefore, a CSS definition, e. g. _color:red is:
  1. 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).
  2. Ignored in any browser but WinIE
  3. Treated as color:red in WinIE

Nhận xét

Bài đăng phổ biến từ blog này

dung lượng RAM lớn nhất mà HĐH cấu trúc 32-bit nhận được

Ký tự viết tắt trong chat & email

Ubuntu LAMP Server