[英]Why doesn't 100% width/height work on iPhone?
If you have the chance to enter to http://toniweb.us/gm in your phone you will see that the dimensions are...wrong. 如果您有机会在手机中输入http://toniweb.us/gm ,您将看到尺寸错误。
Acording to the css: 根据css:
html, body{
position:relative;
height:100%;
width:100%;
overflow-y:hidden;
}
It should be using the whole of it. 它应该使用全部。
And, I added: 而且,我补充说:
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=1, minimum-scale=1, maximum-scale=2.0" />
But I am not so sure what this affects. 但是我不确定这会影响什么。
In addition, the website is optimized to >= 1024 pixels. 此外,网站已优化为> = 1024像素。 Is there a way to adapt iPhone to this?
有没有办法使iPhone适应这种情况? Perhaps by scaling somehow?
也许通过某种方式扩展?
Any hint would be very helpful. 任何提示将非常有帮助。
Tried: 尝试过:
html, body{
position:absolute;
top: 0;
left: 0;
right: 0;
overflow-y: hidden;
}
I guess that above code will do the job ;) And I think your goal was to see only the grey sidebar on the iphone right? 我想上面的代码就可以完成工作;)我认为您的目标是仅看到iphone上的灰色侧边栏,对吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.