media queries internet explorer
i tried to use media queries in my sit开发者_JAVA技巧es. 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 :
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.
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.
精彩评论