Created
October 27, 2013 13:58
-
-
Save synzhang/7182460 to your computer and use it in GitHub Desktop.
CSS 判断浏览器
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @desc CSS 判断浏览器 | |
*/ | |
/* Target IE 10 */ | |
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { | |
p { | |
color: red; | |
} | |
} | |
/* Target Safari and Chrome */ | |
@media screen and (-webkit-min-device-pixel-ratio:0) { | |
p { | |
color: red; | |
} | |
} | |
/* Target Firefox */ | |
@-moz-document url-prefix() { | |
p { | |
color: red; | |
} | |
} | |
/* Target Opera */ | |
x:-o-prefocus, p { | |
color: red; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment