解決辦法:引入Respond.js讓IE6-8支持CSS3 Media Query
使用方式
參考官方demo:http://scottjehl.github.com/Respond/test/test.html
1.在css中正常用 min/max-width media queries
@media screen and (min-width: 480px){
...styles for 480px and up go here
}
2.引入respond.min.js,但要在css的後面(越早引入越好,在ie下面看到頁面閃屏的概率就越低,因爲最初css會先渲染出來,如果respond.js加載得很後面,這時重新根據media query解析出來的css會再改變一次頁面的佈局等,所以看起來有閃屏的現象)