【问题标题】:Margin left not working on iPad portrait mode边距在 iPad 纵向模式下不起作用
【发布时间】:2012-10-13 07:42:03
【问题描述】:

我的网站的左边距在 iPad 上不起作用(纵向模式)。它在横向模式下完全居中,但是当我将其转到纵向视图时,我的左边距似乎设置为零。你能帮我解决这个问题吗?

我的网站:www.inclouds.co.uk/test 我正在使用ipadpeek 在 ipad 上查看我的网站:

我的css代码:

#container {

    width: 990px;
    margin: 0 auto;
    position: absolute;


 }
#header {
width: 990px;
height: 220px;
margin-left: auto;
margin-right: auto;
margin-top: auto;
display: block;
}

【问题讨论】:

    标签: ipad margin portrait


    【解决方案1】:

    尝试将宽度更改为 100%。您强迫它比纵向的 iPad 屏幕更宽。

    另外,不要使用那个测试站点,在 Safari 中打开开发者模式,将您的设备连接到您的计算机,然后从 Safari 的开发者菜单中打开 Web Inspector。

    【讨论】:

      猜你喜欢
      • 2023-04-09
      • 2023-03-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多