Home >Web Front-end >HTML Tutorial >Regarding the problem of referencing external CSS files to adapt to the screen_html/css_WEB-ITnose
CSS HTML adaptive
Straight to the point. In order to achieve the effect of adaptive screen, I achieved it by referencing external CSS through 2cdf5bf648cf2f33323966d7f58a7f3f.<link rel="stylesheet" type="text/css" media="screen and (max-device-width:1140px)" href="~/CSS/default/default1024.css" /> <link rel="stylesheet" type="text/css" media="screen and (min-width:1141px) and (max-device-width:1500px)" href="~/CSS/default/default1133.css"/> <link rel="stylesheet" type="text/css" media="screen and (min-width:1501px) and (max-device-width:1800px)" href="~/CSS/default/default1500.css"/> <link rel="stylesheet" type="text/css" media="screen and (min-width:1801px)" href="~/CSS/default/default1800.css"/>
<link rel="stylesheet" type="text/css" href="~/CSS/default/default1133.css"/>
IE does not support min_width in the early days
If 360 is in compatibility mode, it is early IE
In this case, you should find a way to set css through js
Just use JS to determine the size of the form and set the CSS.
Refer to this: http://my.oschina.net/lixx/blog/92386