<div class="shouldBeOverlapped">
content
</div>现在我想在它上面添加另一个div (例如等待),这样它将100%覆盖它,并使它不可点击,最好是透明的。该怎么做呢?
发布于 2017-03-16 17:33:55
您可以尝试将等待的div作为:before。尽管它是有限的,但它可以很容易地设置。
#textToHide {
background: yellow;
position: relative;
width: 300px;
padding: 10px;
}
#textToHide:before {
content: '';
position:absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
}<div id="textToHide">
This text is protected against selection... although we could still look for it in the source code...
</div>
https://stackoverflow.com/questions/42829818
复制相似问题