为什么100%的宽度/高度在iPhone上工作? [英] Why doesn't 100% width/height work on iPhone?
本文介绍了为什么100%的宽度/高度在iPhone上工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果您有机会在手机中输入 http://toniweb.us/gm ,您将会
<$>
$ b c $ c> html,body {
position:relative;
height:100%;
width:100%;
overflow-y:hidden;
}
应该使用它的全部。
并且,我添加了:
< meta name =viewportcontent = device-width,initial-scale = 1,user-scalable = 1,minimum-scale = 1,maximum-scale = 2.0/>
但我不太确定这会影响什么。
此外,网站优化为> = 1024像素。有没有办法适应iPhone这个?
解决方案
任何提示都会非常有帮助。 p>尝试:
html,body {
position:absolute;
top:0;
left:0;
right:0;
overflow-y:hidden;
}
我想上面的代码会做这项工作)
我认为你的目标是只看到iPhone上的灰色侧边栏?
If you have the chance to enter to http://toniweb.us/gm in your phone you will see that the dimensions are...wrong.
Acording to the 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. Is there a way to adapt iPhone to this? 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?
这篇关于为什么100%的宽度/高度在iPhone上工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文