Respond.js-20150415_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:46:12
Original
912 people have browsed it

Respond.js allows IE6-8 to support CSS3 Media Query.

This js file is introduced in Bootstrap. From the name, it can be seen that it is adaptive and compatible. I opened IE and took a look. The effect is quite good, and the adaptive effect is quite good. Respond.js enables browsers that do not support CSS3 Media Query, including IE6-IE8 and other browsers, to support querying.

Take out the css path and put it into the array

2. Then traverse the array and send ajax requests one by one

3. After the ajax callback, only analyze the min of the media query in the response -width and max-width syntax, analyze the viewport change interval corresponding to the corresponding css block

4. When the page is initialized and window.resize, use the corresponding css block according to the current viewport.

Usage: Considering that IE9 supports CSS3, you can directly add the script reference in the head tag of the HTML page: