media queries internet explorer

2019-01-28 04:22发布

i tried to use media queries in my sites. it works well in firefox and safari, but not for IE. does anyone know to make the media queries work well in IE(internet explorer 7 and 8).

here is the code : enter image description here

2条回答
不美不萌又怎样
2楼-- · 2019-01-28 05:03

Maybe this can also be useful:

To make media queries work in IE8 or older, you can use respond.js. Download the script file, copy it to your scripts folder (or wherever you like). Then put the line below into the head part of your html document (assuming you copied the file to the scripts folder).

<script type="text/javascript" src="scripts/respond.js"></script>

And that's it. IE will start to support media queries.

查看更多
相关推荐>>
3楼-- · 2019-01-28 05:11

Unfortunately, media query is not supported in Internet Explorer 8 or older. You can use Javascript to hack around. See these! You can use <!--[if lt IE <version>]> for compatibility issues.

查看更多
登录 后发表回答