【在javascript或css中检测Android屏幕大小 – 没有得到我所期待的】教程文章相关的互联网学习教程文章

在javascript或css中检测Android屏幕大小 – 没有得到我所期待的【代码】

我正在尝试根据Android设备的屏幕大小应用css. 使用媒体查询:@media all and (max-device-width: 480px) {//apply css style to devices of screens with width no larger than 480px}和javascript:window.innerWidth window.innerHeight screen.width screen.height有或没有元标记:<meta name="viewport" content="width=device-width, target-densityDpi=device-dpi, initial-scale=1, user-scalable=no"/> 但是没有一个工作,...