Css hack, csshack
Different css hack attributes of each Browser:
IE6: _zoom:1;IE6/7: *zoom:1;IE6/7/8/9 :\9
Css hack rules for different browsers
IE6: * html {} IE7: +. class {} non-IE6: html> body {} Only Firefox: @-moz-document url-prefix () {} saf3 + and Google: @ media all and (-webkit-min-device-pixel-ratio: 0) {} Only opera: @ media all and (-webkit-min-device-pixel-ratio: 10000), not all and (-webkit-min-device-pixel-ratio: 0) {} iphone/mobile/webkit: @ media screen and (max-device-width: 480px ){}
However, we should try to avoid usingCSS Hack.
- Property: value;/* all browsers */
- + Property: value;/* IE7 */
- _ Property: value;/* IE6 */
- * Property: value;/* IE6/7 */
- Property: value \ 9;/* IE6/7/8/9, that is, all IE browsers */
- * Html selector {... };/* IE6 */
- *: First-child + html selector {... };/* IE7 */
- Html> body selector {... };/* Non-IE6 */
- @-Moz-document url-prefix (){... };/* Firefox */
- @ Media all and (-webkit-min-device-pixel-ratio: 0 ){... };/* Saf3 +/chrome1 + */
- @ Media all and (-webkit-min-device-pixel-ratio: 10000), not all and (-webkit-min-device-pixel-ratio: 0 ){... };/* Opera */
- @ Media screen and (max-device-width: 480px ){... };/* IPhone/mobile webkit */