Comment ajouter un overlay sur une image avec CSS
CSSAjouter une image de fond
Ajouter une image de fond a une <div>
est facile en CSS
<body>
<div class="image"></div>
</body>
.image {
background-image: url('images/background.jpg');
background-size: cover;
width: 1024px;
height: 450px;
}
Ajouter un overlay
.image {
background-image:
linear-gradient(to bottom, rgba(245, 246, 252, 0.50), rgba(117, 19, 93, 0.75)),
url('images/background.jpg');
background-size: cover;
width: 1024px;
height: 450px;
}
Remonter