0
상대적으로 위치한 div가 고정 된 div를 덮는 이유는 무엇입니까?상대적으로 위치한 div가 고정 div를 다루는 이유는 무엇입니까?
HTML (상대적으로 고정 된 DIV 포장 콘텐츠)
<div id="topheading">
Example Example Example Example Example Example Example Example
</div>
<div class="main">
<div class="centerpage">
<div class="contentbox1">
Test
</div>
<div class="contentbox1">
Test 2
</div>
<div class="contentbox1">
Test 3
</div>
</div>
</div>
CSS 고정 위치 DIV가 적용된다
#topheading {
position: fixed;
top: 0px;
left: 0px;
height: 58px;
width: 100%;
background-color: rgba(194, 194, 194, .5);
}
.main {
position: relative;
width: 100%;
}
.centerpage {
width: 99%;
background: #ccc;
overflow: hidden;
margin-top: 62px;
margin-bottom: 2px;
margin-left: auto;
margin-right: auto;
}
.contentbox1 {
float: left;
width: 99%;
background: #448;
min-height: 200px;
border: solid black 2px;
}
: 여기
은 일례이며 당신이 내려갈 때 상대적으로 위치 된 div; 어째서?
중복 가능성 (http://stackoverflow.com/questions/6314193/css-positioning-relative-over-fixed-absolute) – cubrr
'Z 인덱스를 추가 1 '을'# topheader'의 CSS 속성에 추가합니다 :) – cubrr