Overlay Columns - MeggiTools
Run
Toggle Theme
Share Link
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Overlay Columns</title> <style> body { font-family: 'Arial', sans-serif; background-color: #333; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; color: #fff; } .container { display: flex; justify-content: space-around; align-items: center; width: 80%; } .column { position: relative; flex: 1; padding: 20px; margin: 10px; text-align: center; background: rgba(255, 255, 255, 0.1); border-radius: 10px; overflow: hidden; } .column:before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); z-index: 1; transition: background 0.3s ease; } .column:hover:before { background: rgba(0, 0, 0, 0.3); } .column h2 { position: relative; z-index: 2; font-size: 24px; margin-bottom: 20px; } .column p { position: relative; z-index: 2; font-size: 16px; } </style> </head> <body> <div class="container"> <div class="column"> <h2>Overlay 1</h2> <p>Text on dark overlay</p> </div> <div class="column"> <h2>Overlay 2</h2> <p>Cool hover effect</p> </div> <div class="column"> <h2>Overlay 3</h2> <p>Stylish and modern</p> </div> </div> </body> </html>