This article mainly introduces jquery to achieve different size browser using different CSS style sheet method, the need for friends can refer to the following
This method supports IE browsers and other browsers. 1, first define two link, of course you can also be a, the second is to change the CSS code as follows: <link rel= "stylesheet" type= "Text/css" href= "Main.css"/> <link id= "Size-stylesheet" rel= "stylesheet" type= "Text/css" href= "Narrow.css"/> 2, the following JavaScript code will be based on different browser sizes, Change the CSS code as follows: function Adjuststyle (width) { width = parseint (width); if (Width < 7 { $ ("#css"). attr ("href", "css/narrow.css"); } else if (width &G t;= 701) && (Width < 900)) { $ ("#css"). attr ("href", "css/medium.css"); } else { //$ ("#css"). attr ("href", "<?php bloginfo" (' Stylesheet_url '); gt; "); document.write ("Css/style.css") } } $ (function () { &nbs P Adjuststyle ($ (this). Width ()); $ (window). Resize (function () { AdjuststyLe ($ (this). Width ()); }); }); The above code is tested and available!!