*{
margin: 0;
padding: 0;
}
.container{
height: 638px;
width: 100%;
max-width: 100%;
position: absolute;
overflow: hidden;
background-position: center;
top: 0;
z-index: -1;
}
.container img{
width: 100%;
height: 638px;
}
.container #short-des{
background: rgba(0,0,0,.5);
height: 400px;
width: 500px;
position: relative;
}Run Code Online (Sandbox Code Playgroud)
<div class="container">
<img src="cover.jpg">
<div id="short-des">
</div>
</div>Run Code Online (Sandbox Code Playgroud)
我希望short-des div在中心看到可见的图像我尝试了z-index但它不起作用.请帮助我解决这个问题,以便我将来会采取这些措施