cssHack #css #前端 发表于 2015-11-04 | 分类于 css | | 阅读次数 CSS Hack在线查询 hack 属性/值 Hack 1234567891011121314151617181920212223242526272829/* IE 6 */.selector { _color: blue; }.selector { -color: blue; }/* IE 6/7 - acts as an !important */.selector { color: blue !ie; }/* string after ! can be anything *//* IE 6/7 - any combination of these characters: ! $ & * ( ) = % + @ , . / ` [ ] # ~ ? : < > | */.selector { !color: blue; }.selector { $color: blue; }.selector { &color: blue; }.selector { *color: blue; }/* ... *//* IE 8/9 */.selector { color: blue\0/; }/* must go at the END of all rules *//* IE 9/10 */.selector:nth-of-type(1n) { color: blue\9; }/* IE 6/7/8/9/10 */.selector { color: blue\9; }.selector { color/*\**/: blue\9; }/* Everything but IE 6 */.selector { color/**/: blue; } IE Media Query Hack 1234567891011121314151617181920212223/* IE 6/7 */@media screen\9 {}/* IE 8 */@media \0screen {}/* IE 9/10, Firefox 3.5+, Opera */@media screen and (min-resolution: +72dpi) {}/* IE 10+ */@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {}/* IE 6/7/8 */@media \0screen\,screen\9 {}/* IE 8/9/10 & Opera */@media screen\0 {}/* IE 9/10 */@media screen and (min-width:0\0) {}/* Everything but IE 6/7/8 */@media screen and (min-width: 400px) {}