See*_*orf 2 html css iphone ios
我已将网站上传到我的服务器,以便在iphone上进行测试.但是,页脚没有覆盖iPhone的全宽,特别是在Safari Web浏览器上.我相信这与#leaf-print我所拥有的绝对定位的DIV 有关#header.
我已经查看了Stackoverflow上的数十篇文章,但仍无法找到解决方案.该网站位于:www.azumis.com/clients/onaturals.理想情况下,我需要某种CSS代码来强制iPhone屏幕上视口的宽度为952px.任何帮助将不胜感激.谢谢

您正在使用
html,body{
width:952 px;
}
Run Code Online (Sandbox Code Playgroud)
改变它
html,body{
width:100%;
margin:0;
padding:0;
}
Run Code Online (Sandbox Code Playgroud)
仍然存在问题,因为::
虽然你已经做出了改变,html,body{width:100%;}但你又一次改变了它
body{
width:952px; /*..why????..as you have done it after html,body{width:100%;} its overriding the width:100% to width:952px;
}
Run Code Online (Sandbox Code Playgroud)
改为
body{
width:100%;
margin:0;
padding:0;
overflow-x:hidden;
}
Run Code Online (Sandbox Code Playgroud)
还有
#footer{
width:100%; /*...instead of 1024px;...*/
}
Run Code Online (Sandbox Code Playgroud)
如果它仍然无法运行以下代码可能会帮助您
#footer{
width:100%; /*...instead of 1024px;...*/
position: absolute;
right: 0;
left: 0;
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
8871 次 |
| 最近记录: |