小编Rab*_*ara的帖子

如何在图像上看到Div

    *{
    	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但它不起作用.请帮助我解决这个问题,以便我将来会采取这些措施

html css html5 css3

0
推荐指数
1
解决办法
385
查看次数

标签 统计

css ×1

css3 ×1

html ×1

html5 ×1