Prev Demo
Bootstrap
>
Animation Of Navbar Using Affix
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Bootstrap Example</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> <style> .affix { top: 0; width: 100%; -webkit-transition: all .5s ease-in-out; transition: all .5s ease-in-out; border: 2px solid black; background-color: orange; } .affix a { color: black !important; padding: 10px; -webkit-transition: all .5s ease-in-out; transition: all .5s ease-in-out; } .affix-top a { padding: 25px !important; } .affix + .container-fluid { padding-top: 200px; } </style> </head> <body> <div class="container-fluid" style="color:white;background-color:green;height:200px;"> <h2>SN ITFunda</h2> <p> SN ITFunda is a software company which have websites of dotnetfunda, techfunda, itfunda for making people learning .net technologies SN ITFunda is a software company which have websites of dotnetfunda, techfunda, itfunda for making people learning .net technologies SN ITFunda is a software company which have websites of dotnetfunda, techfunda, itfunda for making people learning .net technologies SN ITFunda is a software company which have websites of dotnetfunda, techfunda, itfunda for making people learning .net technologies SN ITFunda is a software company which have websites of dotnetfunda, techfunda, itfunda for making people learning .net technologies SN ITFunda is a software company which have websites of dotnetfunda, techfunda, itfunda for making people learning .net technologies SN ITFunda is a software company which have websites of dotnetfunda, techfunda, itfunda for making people learning .net technologies </p> </div> <nav class="navbar navbar-inverse" data-spy="affix" data-offset-top="200"> <ul class="nav navbar-nav"> <li><a href="#">DotNetFunda</a></li> <li><a href="#">TechFunda</a></li> <li><a href="#">ITFunda</a></li> </ul> </nav> <div class="container-fluid" style="color:black;background-color:pink; height:800px;"> <h2>SN ITFunda</h2> <h2>SN ITFunda</h2> <h2>SN ITFunda</h2> <h2>SN ITFunda</h2> <h2>SN ITFunda</h2> <h2>SN ITFunda</h2> <h2>SN ITFunda</h2> <h2>SN ITFunda</h2> <h2>SN ITFunda</h2> <h2>SN ITFunda</h2> </div> </body> </html>
Note: We DO NOT save your trial code in our database.
Output