我的網頁設計分配有問題。在不同屏幕上的div位置
我不能讓我的4個div出現在屏幕上的特定位置。
還需要提及的是,所有4個div都需要重疊,所以我使用了z-index。但是當我在不同屏幕上運行我的網站時,儘管我使用了百分比,但位置總是變化。
這是我的CSS代碼(welcome, register, login, game
是我的div類):
.welcome
{
position:absolute;
top:28%;
right:9%;
width:960px;
height:660px;
z-index: 3;
}
.register
{
position:absolute;
top:28%;
right:9%;
width:960px;
height:660px;
z-index: 2;
}
.Login
{
position:absolute;
top:28%;
right:9%;
width:960px;
height:660px;
z-index: 1;
}
.game
{
position:absolute;
top:28%;
right:9%;
width:960px;
height:660px;
z-index: 0;
}
我很困惑你想要divs做什麼。 – npage 2013-05-13 22:58:28