Skip to content

Instantly share code, notes, and snippets.

@sh78
Created April 18, 2018 02:17
Show Gist options
  • Save sh78/986954a44925127841a77e995b982b63 to your computer and use it in GitHub Desktop.
Save sh78/986954a44925127841a77e995b982b63 to your computer and use it in GitHub Desktop.
/* To target IE 6 and 7 */
@media screen\9 {
body { background: red; }
}
/* To target IE 6, 7 and 8 */
@media \0screen\,screen\9 {
body { background: green; }
}
/* To target IE 8 */
@media \0screen {
body { background: blue; }
}
/* To target IE 8, 9 and 10 */
@media screen\0 {
body { background: orange; }
}
/* To target IE 9 and 10 */
@media screen and (min-width:0\0) {
body { background: yellow; }
}
/* Note that the `@media` type can be any of the supported types, so rules in `@media screen\9` will target screens and `@media print\9` will only apply to print style sheets. */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment