我有这个问题,div没有显示。代码很简单,只是测试:隐藏在背景后面的css元素
<html>
<head>
<title>Main</title>
<style>
.simple-div {
-moz-border-radius: 15px;
border-radius: 15px;
height: 200px;
width: 200px;
}
</style>
</head>
<body style="background:url('backgrounds/cupcakeBG.jpg') 50% -105px repeat;">
<div style="background: #C8BBBE; top:0px; left:0px; width:100%; height:70px; position: fixed; -moz-border-radius: 15px; border-bottom-left-radius: 15px; border-bottom-right-radius: 15px;">
</div>
<div style="-moz-border-radius: 15px; border-radius: 15px; height: 200px; width: 200px;">
</div>
</body>
</html>
如何保持第二个div在背景图像上方?它目前没有显示在屏幕上,但我可以看到它突出显示使用通过chrome使用Inspect元素。
问候,
我们无法在您的示例中看到背景图像,因为它在本地是 – 2013-03-12 21:06:03
尝试使用'position'和'float'玩 – greener 2013-03-12 21:06:36
您没有任何内容或背景或边框颜色设置,所以没有任何渲染。添加'背景:#F00;'到你的第二个div,你会看到它。 _我已添加它作为答案,因为一些不正确的东西进来了.._ – rgthree 2013-03-12 21:07:05