الصفحة الرئيسية
تحميل الكود
تغيير الألوان
تغيير العرض
تغيير حجم العرض
تشغيل الكود
<!DOCTYPE html> <html> <head> <style> body { margin: 0; } ul { margin: 0; padding: 0; list-style-type: none; background-color: #282a35; overflow: hidden; position: fixed; top: 0; width: 100%; } li { float: left; } li a { display: block; color: white; padding: 12px 16px; text-decoration: none; } li a:hover:not(.active) { background-color: black; } .active { background-color: darkcyan; } </style> </head> <body> <ul> <li><a href="#home">Home</a> <li><a href="#services">Services</a> <li><a href="#contact">Contact</a> <li><a href="#about" class="active">About</a> </ul> <div style="margin-top: 60px; padding: 0 15px 2000px 15px;"> <h1>Fixed Navigation Bar</h1> <p>scroll down to see how the navbar is fixed at the top.</p> <p>scroll down to see how the navbar is fixed at the top.</p> <p>scroll down to see how the navbar is fixed at the top.</p> <p>scroll down to see how the navbar is fixed at the top.</p> <p>scroll down to see how the navbar is fixed at the top.</p> </div> </body> </html>