Ads 468x60px

CSS

Thứ Tư, 29 tháng 2, 2012

CSS Hacks for Different Versions of Firefox

CSS Hacks targeting all Firefox

These hacks target all versions of Firefox:
/* Target all Firefox */
 #selector[id=selector] { color: red; }
 /* Target all Firefox */ 
 @-moz-document url-prefix() { .selector { color: red; } }
 /* Target all Gecko (includes Firefox) */ 
*>.selector { color: red; }

CSS Hacks targeting Firefox 1.5 and newer

This hack targets Firefox versions 1.5 and newer:
/* Target Firefox 1.5 and newer [!] */
 .selector, x:-moz-any-link, x:only-child { color: red; }

CSS Hacks targeting Firefox 2 and older

These hacks target Firefox 2 and older:
/* Target Firefox 2 and older [!] */
 body:empty .selector { color: red; } 
 /* Target Firefox 2 and older */ 
#selector[id=SELECTOR] { color: red; }
 /* Target FireFox 2 and older [!] */ 
html>/**/body .selector, x:-moz-any-link { color: red; }

CSS Hacks targeting Firefox 3

This hack targets Firefox 3 (and possibly newer):
/* Target FireFox 3 [!] */
 html>/**/body .selector, x:-moz-any-link, x:default { color: red; }

Không có nhận xét nào:

Đăng nhận xét