css3 - 求教个问题,关于响应式布局,跟ipad有关,媒体查询失效?
PHP中文网
PHP中文网 2017-04-17 11:26:03
0
2
477

大家好,我说下我的情况。
ipad的像素是1024*768,我使用媒体查询
@media only screen and (max-width:1024px) {css代码}
为何在谷歌浏览器模拟后,css代码正确执行, 而在ipad设备上运行却无效?
还是说有其他更好的方法能让一个页面在ipad上浏览的时候,就能适应ipad的宽度?谢谢!

PHP中文网
PHP中文网

认证0级讲师

reply all(2)
小葫芦

Checked it, it was my mistake. It should be solved using min/max-device-width/height.

迷茫

It is enough to add this sentence, no need for max-device-width/height:

<meta name="viewport" content="width=device-width, initial-scale=1.0"> 
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template