How can I specify CSS rules for Chrome and IE in my HTML page or in a SCSS file?

I want to point out that web browsers like chrome, opera, firefox use a specific css file and browsers like IE (from version 7 to 10) using other css files.

How can I define this?

Thank you all for your help! Merry Christmas!

+5
source share
1 answer

You can use conditional IE comments, such as:

<!--[if IE]> According to the conditional comment this is IE<br /> <![endif]--> 

So you can use something like this:

 <head> <link href="styles.css" rel="stylesheet" type="text/css" /> <!--[if lte IE 10]> <link href="iestyles.css" rel="stylesheet" type="text/css" /> <![endif]--> </head> 

You can learn more about them here.

+2
source

Source: https://habr.com/ru/post/1209807/


All Articles