全屏幕背景不工作在ipad上

时间:2013-06-16 14:32:47

标签: 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;
}

3 个答案:

答案 0 :(得分:0)

请试试这个:

#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%;
}

答案 1 :(得分:0)

尝试

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

-webkit-background-size: cover; 
-moz-background-size: cover; 
-o-background-size: cover; 
}
祝你好运......

答案 2 :(得分:0)

in body add

<div id="fixedbg">
</div>

旁边的

并添加CSS

#fixedbg{
    background:url(../img/sec2.jpg) no-repeat center center;
    height:100%;
    position:fixed !important;
    width:100%;
    z-index:0;
    top:0;
}

祝你好运....