标签:htm 分类 screen nts att asc text 方法 bsp
解决方法:首先,在head标签里面先引用一个通用的CSS文件,如下:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
$( function () { //判断是否宽屏 var winWide = window.screen.width; alert(winWide); var wideScreen = false ; if (winWide <= 1024) { //1024及以下分辨率 $( "#css" ).attr( "href" , "Styles/Style1.css" ); alert( ‘小屏‘ ); } else { $( "#css" ).attr( "href" , "Styles/Style.css" ); alert( ‘大屏‘ ); wideScreen = true ; //是宽屏 } }) |
标签:htm 分类 screen nts att asc text 方法 bsp
原文地址:http://www.cnblogs.com/wang1593840378/p/6147015.html