나는이 코드 슈퍼 간단한 조각이 있습니다이상한 CSS를 고정 행동
<body>
<div style="position:fixed; width: 100%; height: 40px; background: #333"></div>
<div style='margin-top:40px; border: 1px solid green'>
Some contents!<br>Some contents!<br>Some contents!<br>
</div>
</body>
을하지만 어떻게 든 고정 사업부는 40px의 마진을 가지고 있으며, 두 번째 DIV 중복! 아무도 내가 여기에서 놓친 것을 지적 해 주시겠습니까?
JS 바이올린 : http://jsfiddle.net/hoangkhanh/zHkkH/
감사합니다!
마음? –
여기에'position : fixed'가 있고, 바이올린에는'position : absolute'이 있습니까? – Vucko