Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>My Website</title>
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <style>
- body, html {
- margin: 0;
- padding: 0;
- height: 100%;
- font-family: Arial, Helvetica, sans-serif;
- background: #000;
- }
- .main-section {
- position: relative;
- min-height: 100vh;
- background-image: url('your-background-image.jpg');
- background-size: cover;
- background-position: center;
- color: white;
- overflow: hidden;
- }
- .overlay-title {
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- background: rgba(0, 0, 0, 0.5);
- padding: 40px 80px;
- border-radius: 10px;
- font-size: 3em;
- text-align: center;
- z-index: 2;
- }
- .fade-overlay {
- position: absolute;
- bottom: 0;
- left: 0;
- width: 100%;
- height: 50vh;
- background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 100%);
- pointer-events: none;
- z-index: 1;
- }
- .gallery-section {
- background: #000;
- padding: 60px 15px;
- min-height: 50vh;
- display: flex;
- flex-wrap: wrap;
- gap: 20px;
- justify-content: center;
- }
- .gallery-img {
- width: 200px;
- height: 140px;
- object-fit: cover;
- border-radius: 8px;
- box-shadow: 0 2px 10px rgba(0,0,0,0.4);
- }
- @media only screen and (max-width: 600px) {
- .overlay-title {
- font-size: 1.5em;
- padding: 20px 10px;
- }
- .gallery-img {
- width: 100px;
- height: 70px;
- }
- }
- </style>
- </head>
- <body>
- <div class="main-section">
- <div class="overlay-title">My Website</div>
- <div class="fade-overlay"></div>
- </div>
- <div class="gallery-section">
- <!-- Add your gallery images here -->
- <img class="gallery-img" src="gallery-image1.jpg" alt="Gallery image 1" />
- <img class="gallery-img" src="gallery-image2.jpg" alt="Gallery image 2" />
- <img class="gallery-img" src="gallery-image3.jpg" alt="Gallery image 3" />
- <!-- ...more images as needed -->
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment