0
我有这个超级简单的代码:奇怪的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>
但不知何故固定div有40像素的保证金和重叠第二个div!请有人指出我在这里错过了什么?
JS小提琴:http://jsfiddle.net/hoangkhanh/zHkkH/
谢谢!
心灵解释downvote? –
在这里,你有'位置:固定',并在小提琴你有'位置:绝对'? – Vucko