0
我试图在Coverr.co的视频上添加一个灰色叠加层,但仍在文本后面。我尝试使用rgba()添加颜色和不透明度,但它似乎不适用于我。继承人的代码:为Coverr.co视频添加浅灰色叠加层?
.video-container .filter {
z-index: 100;
position: absolute;
background: rgba(255, 255, 255, 0.4);
width: 100%;
}
<div class="video-container">
<div class="filter"></div>
<video autoplay loop class="fillWidth">
<source src="Productive-Morning/MP4/Productive-Morning.mp4" type="video/mp4" />Your browser does not support the video tag. I suggest you upgrade your browser.
<source src="Productive-Morning/WEBM/Productive-Morning.webm" type="video/webm" />Your browser does not support the video tag. I suggest you upgrade your browser.
</video>
<div class="poster hidden">
<img src="Productive-Morning/snapshots/Productive-Morning.jpg" alt="">
</div>
</div>