<!DOCTYPE HTML><HTML> <Head> <title>IE10/11 Media Query Test</title> <MetaCharSet= "Utf-8"> <Metahttp-equiv= "X-ua-compatible"content= "Ie=edge"> <style>@media All and (-ms-high-contrast:none){. foo {color:Green} /*IE10*/*::-ms-backdrop,. Foo{Color:Red} /*IE11*/ } </style> </Head> <Body> <Divclass= "Foo">Hi there!!!</Div> </Body></HTML>
IE 6
* html .ie6 {property:value;}
Down Votein the light of the evolving thread, I had updated the Below:ie 6* html. IE6 {property:value;} or.ie6 {_property:value;} IE 7*+html. IE7 {property:value;} Or*:first-child+html. IE7 {property:value;} IE 6 and 7@media screen\9 {. ie67 {property:value;}} or.ie67 {*property:value;} or.ie67 {#property: value;} IE 6, 7 and 8@media \0screen\,screen\9 {. ie678 {property:value;}} IE 8html>/**/body. IE8 {property:value;} Or@media \0screen {. IE8 {property:value;}} IE 8 Standards Mode ONLY.IE8 {property/*\**/: value\9}ie 8,9 and 10@media screen\0 {. ie8910 {property:value;}} IE 9 Only@media screen and (min-width:0\0) and (min-resolution:. 001DPCM) {//IE9 CSS. Ie9{property:value;}} IE 9 and Above@media screen and (min-width:0\0) and (min-resolution: +72dpi) {//ie9+ CSS. Ie9up{property:value;}} IE 9 and 10@media screen and (min-width:0\0) {. ie910{property:value\9;}/* backslash-9 removes ie11+ & old Safari 4 */}ie Only_:-ms-lang (x),. ie10 {property:value\9;} IE 10 and Above_:-ms-lang (x),. ie10up {property:value;} Or@media all and (-ms-high-contrast:none), (-ms-high-contrast:active) {. Ie10up{property:value;}} IE one (and above..) _:-ms-fullscreen,: Root. ie11up {property:value;}
Original Address http://stackoverflow.com/questions/20541306/how-to-write-a-css-hack-for-ie-11
IE11 Media inquiries and other hack