기본적으로 나는 겹치는 부분 뒤에 다른 div가있는 상태에서 항상 앞면에 가운데 이미지 ("drob"div)를 표시하려고합니다. 당신은 당신의 중첩 된 div의 Z- 인덱스를 설정해야합니다div를 다른 div 상단에 배치하려면 어떻게해야합니까?
body {
background-image:url('background.jpg');
}
#container {
width: 1040px;
height: 768px;
margin: 0 0 0 75px;
}
#navbar {
float: right;
height: auto;
width: 150px;
margin: 0 0 0 10px;
color: #FF0;
list-style: none;
}
#note {
width: auto;
height: auto;
float: left;
margin: 20px 0 0 -110px;
}
#drob {
height: auto;
width: auto;
float: left;
margin: 50px 0 0 -20px;
}
#gallery {
float: left;
width: 675px;
height: auto;
margin: -125px 0 0 -20px;
}
#gallery img {
float: left;
margin: 0 0 0 5px;
}
#video {
height: auto;
width: auto;
float: left;
margin: 150px 0 0 -20px;
}
<div id="container">
<div id="navbar">
<ul>
<li>Home</li>
<li>About Denard</li>
<li>Stats</li>
<li>Media</li>
</ul>
</div>
<div id="video">
<iframe width="450" height="265" src="http://www.youtube.com/embed/ZmmCAI8U_Vc"
frameborder="0" allowfullscreen></iframe>
</div>
<div id="drob">
<img src="images/drob.png" height="560" width="404" alt="Denard Robinson" />
</div>
<div id="note">
<a href="#"><img src="images/note.png" height="464" width="331" alt="note" /></a>
</div>
<div id="gallery">
<img src="denard1.jpg" height="145" width="215" alt="denard1" />
<img src="denard2.jpg" height="145" width="215" alt="denard2" />
<img src="denard3.jpg" height="145" width="215" alt="denard3" />
</div>
</div>
</body>
귀하의 질문을 바로 읽으면 #drop을 주 이미지로 잡고 # 갤러리에서 #drop 뒤에있는 이미지를 원하십니까? 달성하려는 이미지를 제공해 주시겠습니까? – Filth