Zenworkspace Navigation Bar - 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>ZenWorkspace Navigation Bar</title> <style> body { margin: 0; font-family: 'Arial', sans-serif; background-color: #f8f9fa; } .navbar { background: #f8f9fa; background-image: linear-gradient(to top left, rgba(0, 0, 0, .2), rgba(0, 0, 0, .2) 30%, rgba(0, 0, 0, 0)); box-shadow: inset 2px 2px 3px rgba(255, 255, 255, .6), inset -2px -2px 3px rgba(0, 0, 0, .6); padding: 20px; display: flex; justify-content: space-between; align-items: center; } .navbar .logo { font-size: 24px; font-weight: bold; color: #6f42c1; text-transform: uppercase; } .navbar .menu { display: flex; list-style: none; gap: 20px; } .navbar .menu li { position: relative; } .navbar .menu li a { text-decoration: none; color: #6f42c1; font-size: 18px; padding: 10px 20px; border-radius: 30px; transition: all 0.3s ease; } .navbar .menu li a:hover { background: #e9d8fd; box-shadow: 2px 2px 5px rgba(0, 0, 0, .1), -2px -2px 5px rgba(255, 255, 255, .6); transform: translateY(-5px); } .navbar .menu li a .icon { margin-right: 8px; } .menu-toggle { display: none; flex-direction: column; cursor: pointer; } .menu-toggle span { width: 30px; height: 3px; background: #6f42c1; margin: 5px 0; transition: all 0.3s ease; } @media (max-width: 768px) { .navbar { flex-direction: column; } .navbar .menu { flex-direction: column; width: 100%; display: none; } .navbar .menu li a { text-align: center; width: 100%; padding: 15px 0; } .menu-toggle { display: flex; } .menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); } .menu-toggle.active span:nth-child(2) { opacity: 0; } .menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); } } .fade-in { animation: fadeIn 0.5s ease forwards; } @keyframes fadeIn { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } } </style> </head> <body> <nav class="navbar"> <div class="logo">ZenWorkspace</div> <div class="menu-toggle" id="menu-toggle"> <span></span> <span></span> <span></span> </div> <ul class="menu" id="menu"> <li><a href="#"><span class="icon">🏠</span>Home</a></li> <li><a href="#"><span class="icon">📅</span>Calendar</a></li> <li><a href="#"><span class="icon">💼</span>Projects</a></li> <li><a href="#"><span class="icon">📈</span>Analytics</a></li> <li><a href="#"><span class="icon">📞</span>Contact</a></li> </ul> </nav> <script> const menuToggle = document.getElementById('menu-toggle'); const menu = document.getElementById('menu'); menuToggle.addEventListener('click', () => { menu.classList.toggle('fade-in'); menuToggle.classList.toggle('active'); if (menu.style.display === 'flex') { menu.style.display = 'none'; } else { menu.style.display = 'flex'; } }); </script> </body> </html>