Use a combination of Microsoft specific CSS rules to filter IE11:
<!doctype html>
<html>
<head>
<title>IE10/11 Media Query Test</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<style>
@media all and (-ms-high-contrast:none)
{
.foo { color: green } /* IE10 */
*::-ms-backdrop, .foo { color: red } /* IE11 */
}
</style>
</head>
<body>
<div class="foo">Hi There!!!</div>
</body>
</html>
Filters such as this work because of the following:
When a user agent cannot parse the selector (i.e., it is not valid CSS 2.1), it must ignore the selector and the following declaration block (if any) as well.
<!doctype html>_x000D_
<html>_x000D_
<head>_x000D_
<title>IE10/11 Media Query Test</title>_x000D_
<meta charset="utf-8">_x000D_
<meta http-equiv="X-UA-Compatible" content="IE=edge">_x000D_
<style>_x000D_
@media all and (-ms-high-contrast:none)_x000D_
{_x000D_
.foo { color: green } /* IE10 */_x000D_
*::-ms-backdrop, .foo { color: red } /* IE11 */_x000D_
}_x000D_
</style>_x000D_
</head>_x000D_
<body>_x000D_
<div class="foo">Hi There!!!</div>_x000D_
</body>_x000D_
</html>
_x000D_
References