简体   繁体   中英

support media query in IE7 and IE8

i use media query for responsive my site but it doesn't support in IE<9 i download "matchmedia.js" and "css3-mediaqueries-js.js" code from github,BUT it doesn't work . AM I missing something? in addition i use this meta tag too,but it doesn't work.

The polifill I used was adding styles for matched media queries as styles tags on the page. So rules were getting out of order.

For example such code

.smth { margin: 1em; }
@media only screen and (max-width: 900px) { .smth { margin: .5em; } }
.other { margin-top: 0; }

becomes reordered as

.smth { margin: 1em; }
.other { margin-top: 0; }
/* following line appears on the page */
.smth { margin: .5em; }

And in case of

<div class="smth other">...</div>

works incorrectly.

Check libraries you are using for having same problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM