0
私はそのdivの幅と高さが可変である特定のdivをオーバーレイでカバーしたいと思います。どうやってやるの?オーバーレイ固有のdivでどのようにカバーできますか?
参考のためfiddlerです。
.c1 {
border: 1px solid red;
padding: 10px;
margin: 5px;
}
.overlay {
position: relative;
z-index: 1000;
width: 100%;
height: 100%;
background-color: rgba(255, 255, 255, 0.85);;
opacity: 1;
}
<p>
content before
</p>
<div class="c1">
<div class="overlay"></div>
<div class="c2">
<h1>
some content
</h1>
<p>
some content under overlay some content under overlay some content under overlay some content under overlay some content under overlay some content under overlay some content under overlay some content under overlay some content under overlay some content under overlay some content under overlay some content under overlay some content under overlay some content under overlay some content under overlay
</p>
<p>
some content under overlay some content under overlay some content under overlay some content under overlay some content under overlay some content under overlay
</p>
</div>
</div>
<p>
content after
</p>