Detect IE10+ & Edge with CSS
by Ercan Cicek
HTML
<div>
<span id="ie">IE10+</span><br />
<span id="edge">Edge</span>
</div>
CSS
div {
width: 100%;
text-align: center;
}
#ie, #edge {
font-family: "Verdana";
font-size: 4em;
text-decoration: line-through;
}
/* --- adress IE10+ --- */
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
#ie {
text-decoration: none !important;
}
}
/* --- adress EDGE --- */
@supports (-ms-ime-align:auto) {
#edge {
text-decoration: none !important;
}
}