Galaxy Dropdown - 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>Galaxy Dropdown</title> <style> body { font-family: 'Arial', sans-serif; background: radial-gradient(circle, #1e3c72, #2a5298); color: #fff; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; } .dropdown { position: relative; display: inline-block; } .dropdown-btn { background-color: #4e54c8; color: #fff; padding: 15px 30px; font-size: 18px; border: none; cursor: pointer; transition: background-color 0.3s ease; display: flex; align-items: center; } .dropdown-btn:hover { background-color: #232a84; } .dropdown-btn .icon { margin-left: 10px; transition: transform 0.3s ease; } .dropdown-content { display: none; position: absolute; background-color: #fff; color: #333; box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); overflow: hidden; z-index: 1; width: 217.7px; } .dropdown-content a { color: #333; padding: 12px 16px; text-decoration: none; display: block; transition: background-color 0.3s ease, color 0.3s ease; } .dropdown-content a:hover { background-color: #4e54c8; color: #fff; } .dropdown-content .icon { margin-right: 10px; } .dropdown:hover .dropdown-content { display: block; animation: fadeIn 0.5s; } .dropdown:hover .dropdown-btn .icon { transform: rotate(180deg); } @keyframes fadeIn { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } } </style> </head> <body> <div class="dropdown"> <button class="dropdown-btn"> Galaxy Options <span class="icon">🔭</span> </button> <div class="dropdown-content"> <a href="#"><span class="icon">🌌</span>Milky Way</a> <a href="#"><span class="icon">⭐</span>Andromeda</a> <a href="#"><span class="icon">🌠</span>Sombrero</a> <a href="#"><span class="icon">🌟</span>Black Eye</a> </div> </div> </body> </html>