Vídeo de fondo con letras encima en HTML 5 y CSS 3
HTML 5
<nav>
<video src="../media/playita2.mp4" controls autoplay loop></video>
<h1>Contact us</h1>
</nav>
CSS
nav{
width: 100%;
height: 300px;
background: red;
display: flex;
align-items: center;
justify-content: center;
position: relative;
overflow: hidden;
}
nav::before{
width: 100%;
height: 100%;
content: "";
background: rgba(0, 0, 0, 0.596);
position: absolute;
}
nav video{
width: 100%;
}
Esto ayudara para los códigos más nuevos...
.store-banner {
border: 1px solid #ff9f1c;
border-radius: 12px;
padding: 36px 40px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 28px;
background: url(img/equipos/banners/bannerpnove.jpg)
no-repeat center center / cover;
position: relative;
overflow: hidden;
}
.store-banner::before {
content: "";
position: absolute;
inset: 0;
background: rgba(0, 0, 0, 0.65);
z-index: 1;
pointer-events: none;
}
.store-banner-text,
.store-banner-action {
position: relative;
z-index: 2;
}
No hay comentarios:
Publicar un comentario