我能夠使一個div
轉到窗口大小AKA的拉伸填充屏幕。現在我想知道其餘部分如何不相互重疊,以便我可以按順序滾動它們中的每一個,並在每個div中保留居中的文本?現在,它只是顯示的東西3.拉伸到窗口大小的多個div
我想實現:
這裏是註釋CSS:
/* Each of the divs and their independent backgrounds */
#thing1 {
position:absolute;
top:0;
left:0;
width:100%;
height:100%;
z-index:1000;
background: blue;
}
#thing2 {
position:absolute;
top:0;
left:0;
width:100%;
height:100%;
z-index:1000;
background: red;
}
#thing3 {
position:absolute;
top:0;
left:0;
width:100%;
height:100%;
z-index:1000;
background: green;
}
/* Centering the text */
#text {
width: 100px;
height: 100px;
margin: auto;
position: absolute;
top:0;
bottom: 0;
left: 0;
right: 0;
}
我怎樣才能讓它們不重疊呢? :D – lawx
你究竟想要整個事情是什麼樣子? – Kaloyan
檢查我的問題,我添加了一個圖像。 – lawx