Minimal Overlay - 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>Minimal Overlay</title> <style> body, html { height: 100%; margin: 0; font-family: 'Arial', sans-serif; background: #f0f0f0; display: flex; justify-content: center; align-items: center; } .overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.85); display: none; z-index: 1000; animation: fadeIn 0.7s ease-in-out forwards; } @keyframes fadeIn { from {opacity: 0;} to {opacity: 1;} } .overlay-content { position: relative; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; color: #fff; } .overlay-content h1 { font-size: 2.5em; margin: 0; animation: fadeInText 1s ease-in-out forwards; } @keyframes fadeInText { from {opacity: 0;} to {opacity: 1;} } .overlay-content p { font-size: 1.2em; margin: 20px 0; animation: fadeInText 1s ease-in-out forwards; animation-delay: 0.3s; } .close-btn { position: absolute; top: 20px; right: 20px; font-size: 2em; cursor: pointer; color: #fff; animation: fadeIn 1.5s ease-in-out forwards; } .close-btn:hover { color: #ff4c4c; } .centered-button { padding: 10px 20px; font-size: 1.2em; background: rgba(0, 0, 0, 0.85); color: #fff; border: none; cursor: pointer; transition: background 0.3s; } .centered-button:hover { background: rgba(0, 0, 0, 0.75); } </style> </head> <body> <div class="overlay" id="minimalOverlay"> <div class="overlay-content"> <h1>Minimal Overlay 🌿</h1> <p>Simple and clean overlay design</p> </div> <span class="close-btn" onclick="closeMinimalOverlay()">×</span> </div> <button class="centered-button" onclick="openMinimalOverlay()">Open Minimal Overlay</button> <script> function openMinimalOverlay() { document.getElementById('minimalOverlay').style.display = 'block'; } function closeMinimalOverlay() { document.getElementById('minimalOverlay').style.display = 'none'; } </script> </body> </html>