0

你知道为什么,在我的网站上,全屏背景在 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;
}
4

3 回答 3

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%;
}
于 2013-06-16T14:37:58.470 回答
0

在正文中添加

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

祝你好运......

于 2014-10-08T09:31:31.787 回答
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; 
}

祝你好运...

于 2013-06-16T14:52:45.137 回答