J
J
Jack Cooper2015-05-31 13:08:56
css
Jack Cooper, 2015-05-31 13:08:56

How to write styles for IE10?

How to write styles for IE10.
I need to write styles that would be accepted by IE10 and IE9 (if possible).
At least on IE10 on the Internet, the options (hacks) are not working, they work on IE11.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Denis Ineshin, 2015-05-31
@IonDen

For lower versions of IE

<!DOCTYPE html>
<!--[if IE 8]>         <html class="lt-ie10 lt-ie9"> <![endif]-->
<!--[if IE 9]>         <html class="lt-ie10"> <![endif]-->
<!--[if gt IE 9]><!--> <html> <!--<![endif]-->
<head>
...

now we can write in styles:
Unfortunately, this trick cannot be repeated with IE10, so we do this in JS:
if (Function('/*@cc_on return [email protected]*/')()){
    document.documentElement.className+=' ie10';
}

Z
zooks, 2015-05-31
@zooks

1. IE9: zooks.ru/web/355
2. Using browser version detection is not recommended for IE>9.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question