gpt4 book ai didi

html - 向 Coverr.co 视频添加浅灰色叠加层?

转载 作者:太空宇宙 更新时间:2023-11-04 09:56:27 25 4
gpt4 key购买 nike

我正在尝试在 Coverr.co 的视频上添加灰色叠加层,但仍在文本后面。我尝试使用 rgba() 添加颜色和不透明度,但它似乎对我不起作用。继承人的代码:

.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>

最佳答案

我明白了。我在类为“filter”的 div 之前添加了一个 div,然后给它添加了以下 CSS:

.bg-overlay {
background-color: rgba(0, 0, 0, 0.4);
position: absolute;
width: 100%;
height: 100%;
top: 0px;
left: 0px;
z-index: 1;
}

关于html - 向 Coverr.co 视频添加浅灰色叠加层?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38678211/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com