html - 全屏背景不适用于ipad

标签 html css

你知道为什么吗,在 my website全屏背景在 iPad 上不起作用?非常感谢

我试过这个:

#presentation {
    height: 1300px;
    background: #afc9ff;
    background: url(../images/bg-24.jpg) no-repeat center fixed;
    -webkit-background-size: 100%; 
    -moz-background-size: 100%; 
    -o-background-size: 100%; 
    background-size: 100%; 
    -webkit-background-size: cover; 
    -moz-background-size: cover; 
    -o-background-size: cover; 
    background-size: cover;

}

还有这个

#activity {
    height: 1300px;
    background: #8aba56;
    padding-top: 150px;
    background: url(../images/bg-22.jpg) no-repeat center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    background-size: cover;
    -ms-background-size: cover;
    -o-background-size: cover;
}

最佳答案

请试试这个:

#activity {
    height: 1300px;
    background: #8aba56;
    padding-top: 150px;
    background: url(../images/bg-22.jpg) no-repeat center fixed;
    -webkit-background-size: 100% 100%;
    -moz-background-size: 100% 100%;
    background-size: 100% 100%;
    -ms-background-size: 100% 100%;
    -o-background-size: 100% 100%;
}

关于html - 全屏背景不适用于ipad,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17134352/

相关文章:

javascript - 单击屏幕上的菜单/幻灯片以导航到不同的页面

css - 使用 Javascript 在点击时更改超过 1 个 CSS 值?

javascript - 将顶部对齐的文本附加到一行底部对齐的图像的底部

html - 如何使此文本与我的图像一致?布局问题

html - 使 ul 元素适合 div

html - css 动态应用类样式

css - z-index 不适用于 div 标签

html - Material Angular 自动完成 : how to remains the mat-option in the screen after selecting an option?

ios - 如何防止 iphone 的 jquery 移动应用程序在 ipad 中自动拉伸(stretch)

html - 是否可以在水平布局的无序列表元素中包含 block 元素