Created
January 21, 2015 15:14
-
-
Save yoelnacho/b1a155a61d81d980d350 to your computer and use it in GitHub Desktop.
mymQwW
This file contains 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
%title | |
data-useragent | |
%h1 | |
Si lo ves en color verde, estás en IE10. | |
%br | |
Si lo ves en color azul, estás en IE11. |
This file contains 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
var data = document.documentElement; | |
data.setAttribute('data-useragent', navigator.userAgent); |
This file contains 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
h1 { | |
text-align: center; | |
} | |
/* condición para IE10 */ | |
html[data-useragent*='MSIE 10.0']{ | |
color: green; | |
} | |
/* condición para IE11 */ | |
html[data-useragent*='rv:11.0']{ | |
color: blue; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment