Aller au contenu principal
Guillaume Duverger Code & graphisme

Exemple overlay CSS position absolue



<body>

<div class="overlay"></div>
	







*{
  box-sizing: border-box;
}

html, 
body {

min-height: 100vh;

	
}

body {

margin: 0;
position: relative; 
background: white;
color: #555;
	
}


.overlay {
	
position: absolute;
inset:0;
background-color: hsla(0, 0%, 0%, 0.5);
	
}