Professional Dropdown 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>Professional Dropdown Menu</title> <style> body { font-family: 'Arial', sans-serif; background: linear-gradient(135deg, #ece9e6, #ffffff); display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; } .dropdown { position: relative; display: inline-block; } .dropdown-btn { background-color: #4CAF50; color: white; padding: 16px; font-size: 16px; border: none; cursor: pointer; border-radius: 8px; transition: background-color 0.3s ease, transform 0.3s ease; display: flex; align-items: center; } .dropdown-btn:hover { background-color: #45a049; transform: translateY(-3px); } .dropdown-btn:focus { outline: none; } .dropdown-content { display: none; position: absolute; background-color: #f9f9f9; box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); border-radius: 8px; overflow: hidden; z-index: 1; animation: dropdown-animation 0.5s ease; } .dropdown-content a { color: black; padding: 12px 16px; text-decoration: none; display: block; transition: background-color 0.3s ease; display: flex; align-items: center; } .dropdown-content a:hover { background-color: #f1f1f1; } .dropdown-content a i { margin-right: 8px; } .dropdown:hover .dropdown-content { display: block; } @keyframes dropdown-animation { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } } .emoji { font-size: 20px; margin-right: 10px; } .dropdown-content a span { margin-left: auto; background: #ff6347; color: white; padding: 2px 8px; border-radius: 12px; font-size: 12px; } </style> </head> <body> <div class="dropdown"> <button class="dropdown-btn">Dropdown Menu <i class="emoji">⬇️</i></button> <div class="dropdown-content"> <a href="#"><i class="emoji">🏠</i> Home <span>New</span></a> <a href="#"><i class="emoji">📄</i> About Us</a> <a href="#"><i class="emoji">📞</i> Contact <span>5</span></a> <a href="#"><i class="emoji">⚙️</i> Settings</a> <a href="#"><i class="emoji">🔒</i> Logout</a> </div> </div> </body> </html>