我遇到了一個問題,我是相當新的CSS,但我如何讓一個div超過其他?這是我的代碼:divs在另一個位置,CSS
#left_box
{
margin-top: 0px;
min-width: 10%;
max-width: 10%;
height: 800px;
background: #C90;
border: thin 5px #33CCFF;
position: absolute;
z-index:1;
left: 16px;
top: 1px;
float:none;
}
#bar_outside
{
margin-top:75px;
min-width:10px;
max-width:2000px;
height:55px;
background:#ff69b4;
border:#ff69b4: 5px;
position:static;
z-index:2;
}
感謝您的幫助!
更改'position:static;'到'position:relative;'z-index不能應用靜態定位元素 –
爲了使'z-index'工作,您必須使用'position:relative/absolute/fixed'。 – Vucko
http://jsfiddle.net/6RLqz/那樣? – CRABOLO