<script> var phoneWidth = parseInt(window.screen.width); var phoneHeight = parseInt(window.screen.height); var phoneScale = phoneWidth/750; //除以的值按手机的物理分辨率 var ua = navigator.userAgent; if (/Android (\d+\.\d+)/.test(ua)) { var version = parseFloat(R…
1.媒体查询方法在 css 里面这样写 -------------------- @media screen and (min-width: 320px) and (max-width: 480px){在这里写小屏幕设备的样式} @media only screen and (min-width: 321px) and (max-width: 1024px){这里写宽度大于321px小于1024px的样式(一般是平板电脑)} @media only screen and (min-width:…