Modern Dark Iframe - 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>Modern Dark Iframe</title> <style> body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: #121212; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; } .iframe-container-dark { width: 70%; height: 70%; position: relative; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5); border-radius: 10px; overflow: hidden; background: #1e1e1e; transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out; } .iframe-container-dark:hover { transform: scale(1.05); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7); } .iframe-header-dark { position: absolute; top: 0; width: 100%; height: 40px; background: #333; color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 10px; font-size: 18px; } .iframe-header-dark .title { display: flex; align-items: center; } .iframe-header-dark .title span { margin-right: 10px; } .iframe-header-dark .icons { display: flex; align-items: center; } .iframe-header-dark .icons i { margin: 0 5px; cursor: pointer; transition: color 0.3s; } .iframe-header-dark .icons i:hover { color: #ff7e5f; } .iframe-content-dark { width: 100%; height: calc(100% - 40px); } .iframe-container-dark iframe { width: 100%; height: 100%; border: none; } @keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } } .iframe-header-dark .icons .emoji { margin-right: 20px; animation: pulse 2s infinite; } </style> </head> <body> <div class="iframe-container-dark"> <div class="iframe-header-dark"> <div class="title"> <span>🌑</span> <span>Modern Dark Iframe</span> </div> <div class="icons"> <i class="fas fa-expand"></i> <i class="fas fa-sync"></i> <i class="fas fa-times"></i> <span class="emoji">🌟</span> </div> </div> <div class="iframe-content-dark"> <iframe src="https://example.com" title="Iframe"></iframe> </div> </div> <script src="https://kit.fontawesome.com/a076d05399.js" crossorigin="anonymous"></script> <script> document.querySelector('.fa-expand').addEventListener('click', function() { const iframeContainer = document.querySelector('.iframe-container-dark'); iframeContainer.style.position = 'fixed'; iframeContainer.style.top = '0'; iframeContainer.style.left = '0'; iframeContainer.style.width = '100%'; iframeContainer.style.height = '100%'; iframeContainer.style.zIndex = '1000'; }); document.querySelector('.fa-sync').addEventListener('click', function() { document.querySelector('.iframe-content-dark iframe').contentWindow.location.reload(); }); document.querySelector('.fa-times').addEventListener('click', function() { document.querySelector('.iframe-container-dark').style.display = 'none'; }); </script> </body> </html>