我一直在玩我的边缘,但它没有让步。我将导航栏的 z-index 设置得更大,但它不会在图像上重叠。
最佳答案
这应该可以帮助您,适应您的需求: HTML
<html>
<body>
<div class="nav">
</div>
<img class="img-under">
</body>
</html>
CSS
.nav {
position:absolute;
background-color:#000000;
width:100%;
height:30px;
}
.img-under {
background-color:#e3e3e3;
height:60px;
width:200px;
}
关于html - 我正在尝试在图像顶部重叠导航栏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24197612/