2014-10-10 62 views
0

我想延長我的頁面長度,但我不完全確定如何。截至目前,我在網頁上有一張照片。在圖片的底部,我想放置另一個。但是,當我在代碼中插入一張新圖片時,由於級聯樣式表,它與現有圖片重疊。如何通過CSS擴展頁面的長度?

.background-pic .number-1 { 
background-image: url('../resources/images/hoth4.jpg'); 
background-repeat: no-repeat; 
background-size: 109%; 
height: 930px; 
position:   fixed; 
width: 100%; 
background-color: white; 
z-index:   1; 
} 

.background-pic .number-2 { 
background-image: url('../resources/images/hoth2.jpg'); 
background-repeat: no-repeat; 
background-size: 109%; 
height: 930px; 
position:   fixed; 
width: 100%; 
background-color: white; 
z-index:   1; 
} 
+0

這是怎麼一回事,因爲你正在使用'位置:fixed'都是在同一個地方......你可以分享你的標記,你想要的看? – DaniP 2014-10-10 19:38:12

回答

1

刪除position:fixed

,並添加

.background-pic [class^=number]{ 
    display:block; 
    clear:both 
}