Background Overlay

Background Overlay code:

1.index.html:

<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Background Overlay</title> <link rel="stylesheet" href="style.css"> </head> <body> <section> <div class="overlay"></div> </section> </body> </html>

2.style.css:

body { margin: 0; padding: 0; } section { width: 100%; height: 1500px; background: url(image.jpg); background-size: cover; position: relative; overflow: hidden; } .overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(25,0,255,0.7); }

Оставьте комментарий