[英]in mobile browsers, the footer image does not repeat, but the background image does and is fine
我的網頁在桌面瀏覽器上運行良好,但是在iPhone上打開該網頁時,背景圖像會重復,但頁腳圖像不會重復。 它們具有幾乎相同的CSS代碼,這可能是什么問題?
這是我的身體的CSS代碼
body.login {
margin:0;
padding:0;
position:relative;
background: #161616 url(../img/login-page-bg_01.png) left top repeat-x;
font-family: roboto,"Helvetica Neue",helvetica,arial,sans-serif;
font-size:12px;
line-height: 1.7em;
height:750px;}
這是頁腳的CSS代碼
.login div.footer{
margin:0;
padding:0;
background:url(../img/login-page-bg-footer.png) left top repeat-x;
position:relative;
bottom:0;
left:0;
width:100%;
height: 117px;
z-index:5;
}
問題是主體bg圖像重復,但頁腳圖像僅重復一次。
沒有看到您所有的代碼,這些可能是問題:
width: 100%
僅在其父級具有固定寬度時才有意義。 left
和bottom
的position
。 在這種情況下,它們是無用的。 要查看元素本身是否足夠大,可以添加背景色:
background: red url(../img/login-page-bg-footer.png) left top repeat-x;
我為此喜歡“紅色”。 紅色是大還是小?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.