Skip to content

Instantly share code, notes, and snippets.

@Nitin-Daddikar
Last active August 15, 2017 14:27
Show Gist options
  • Save Nitin-Daddikar/f44dd647ee490acaf507a4e3923f40d0 to your computer and use it in GitHub Desktop.
Save Nitin-Daddikar/f44dd647ee490acaf507a4e3923f40d0 to your computer and use it in GitHub Desktop.
Nitin Daddikar - Different CSS for Different Browsers // source https://jsbin.com/viyiyim
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Different CSS for Different Browsers">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Nitin - Diff CSS for Diff Browser</title>
<style id="jsbin-css">
/* Default */
body{background: orange;}
/* Chrome 29+ */
@media screen and (-webkit-min-device-pixel-ratio:0)
and (min-resolution:.001dpcm) {
body{background: red;}
}
/* Any firefox */
@-moz-document url-prefix() {
body{background: blue;}
}
/* IE 10 & + */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
body{background: green;}
}
/* Edge + */
@supports (-ms-ime-align: auto) {
body{background: yellow;}
}
</style>
</head>
<body>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment