Neon Menu - 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>Neon Menu</title> <style> body { font-family: 'Arial', sans-serif; background-color: #121212; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; } .neon-dropdown { position: relative; display: inline-block; } .neon-dropdown-toggle { background-color: #0f0c29; background: linear-gradient(to right, #24243e, #302b63, #0f0c29); color: white; padding: 12px 24px; font-size: 16px; border: none; border-radius: 8px; cursor: pointer; display: flex; align-items: center; transition: background-color 0.3s ease; box-shadow: 0 0 10px #00ffea, 0 0 20px #00ffea, 0 0 30px #00ffea; } .neon-dropdown-toggle:hover { background-color: #0f0c29; } .neon-dropdown-toggle .icon { margin-left: 10px; transition: transform 0.3s ease; } .neon-dropdown-toggle .icon.rotate { transform: rotate(180deg); } .neon-dropdown-menu { display: none; position: absolute; top: 100%; left: 0; background-color: #1c1c1c; border: 1px solid #333; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); border-radius: 8px; overflow: hidden; transition: max-height 0.3s ease, opacity 0.3s ease; max-height: 0; opacity: 0; z-index: 1000; } .neon-dropdown-menu.show { display: block; max-height: 400px; opacity: 1; } .neon-dropdown-menu-item { padding: 12px 24px; display: flex; align-items: center; transition: background-color 0.3s ease; cursor: pointer; color: #00ffea; } .neon-dropdown-menu-item:hover { background-color: #333; } .neon-dropdown-menu-item .icon { margin-right: 10px; font-size: 18px; } .neon-dropdown-menu-item .text { font-size: 16px; } .neon-dropdown-menu-item .emoji { margin-left: auto; font-size: 20px; } </style> </head> <body> <div class="neon-dropdown"> <button class="neon-dropdown-toggle"> Neon Menu <span class="icon">▼</span> </button> <div class="neon-dropdown-menu"> <div class="neon-dropdown-menu-item"> <span class="icon">🏠</span> <span class="text">Home</span> <span class="emoji">🌟</span> </div> <div class="neon-dropdown-menu-item"> <span class="icon">🔍</span> <span class="text">Search</span> <span class="emoji">💡</span> </div> <div class="neon-dropdown-menu-item"> <span class="icon">📧</span> <span class="text">Contact</span> <span class="emoji">📧</span> </div> <div class="neon-dropdown-menu-item"> <span class="icon">⚙️</span> <span class="text">Settings</span> <span class="emoji">⚙️</span> </div> </div> </div> <script> document.querySelector('.neon-dropdown-toggle').addEventListener('click', function() { const dropdownMenu = document.querySelector('.neon-dropdown-menu'); const dropdownIcon = document.querySelector('.neon-dropdown-toggle .icon'); dropdownMenu.classList.toggle('show'); dropdownIcon.classList.toggle('rotate'); }); document.addEventListener('click', function(event) { const dropdown = document.querySelector('.neon-dropdown'); const dropdownMenu = document.querySelector('.neon-dropdown-menu'); const dropdownIcon = document.querySelector('.neon-dropdown-toggle .icon'); if (!dropdown.contains(event.target)) { dropdownMenu.classList.remove('show'); dropdownIcon.classList.remove('rotate'); } }); </script> </body> </html>