Fixed Top Navbar


SUBMITTED BY: Guest

DATE: Nov. 13, 2013, 8:35 p.m.

FORMAT: Text only

SIZE: 4.2 kB

HITS: 4269

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <meta name="description" content="">
  8. <meta name="author" content="">
  9. <link rel="shortcut icon" href="../../docs-assets/ico/favicon.png">
  10. <title>Fixed Top Navbar Example for Bootstrap</title>
  11. <!-- Bootstrap core CSS -->
  12. <link href="../../dist/css/bootstrap.css" rel="stylesheet">
  13. <!-- Custom styles for this template -->
  14. <link href="navbar-fixed-top.css" rel="stylesheet">
  15. <!-- Just for debugging purposes. Don't actually copy this line! -->
  16. <!--[if lt IE 9]><script src="../../docs-assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
  17. <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
  18. <!--[if lt IE 9]>
  19. <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
  20. <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
  21. <![endif]-->
  22. </head>
  23. <body>
  24. <!-- Fixed navbar -->
  25. <div class="navbar navbar-default navbar-fixed-top" role="navigation">
  26. <div class="container">
  27. <div class="navbar-header">
  28. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
  29. <span class="sr-only">Toggle navigation</span>
  30. <span class="icon-bar"></span>
  31. <span class="icon-bar"></span>
  32. <span class="icon-bar"></span>
  33. </button>
  34. <a class="navbar-brand" href="#">Project name</a>
  35. </div>
  36. <div class="navbar-collapse collapse">
  37. <ul class="nav navbar-nav">
  38. <li class="active"><a href="#">Home</a></li>
  39. <li><a href="#about">About</a></li>
  40. <li><a href="#contact">Contact</a></li>
  41. <li class="dropdown">
  42. <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
  43. <ul class="dropdown-menu">
  44. <li><a href="#">Action</a></li>
  45. <li><a href="#">Another action</a></li>
  46. <li><a href="#">Something else here</a></li>
  47. <li class="divider"></li>
  48. <li class="dropdown-header">Nav header</li>
  49. <li><a href="#">Separated link</a></li>
  50. <li><a href="#">One more separated link</a></li>
  51. </ul>
  52. </li>
  53. </ul>
  54. <ul class="nav navbar-nav navbar-right">
  55. <li><a href="../navbar/">Default</a></li>
  56. <li><a href="../navbar-static-top/">Static top</a></li>
  57. <li class="active"><a href="./">Fixed top</a></li>
  58. </ul>
  59. </div><!--/.nav-collapse -->
  60. </div>
  61. </div>
  62. <div class="container">
  63. <!-- Main component for a primary marketing message or call to action -->
  64. <div class="jumbotron">
  65. <h1>Navbar example</h1>
  66. <p>This example is a quick exercise to illustrate how the default, static and fixed to top navbar work. It includes the responsive CSS and HTML, so it also adapts to your viewport and device.</p>
  67. <p>To see the difference between static and fixed top navbars, just scroll.</p>
  68. <p>
  69. <a class="btn btn-lg btn-primary" href="../../components/#navbar" role="button">View navbar docs &raquo;</a>
  70. </p>
  71. </div>
  72. </div> <!-- /container -->
  73. <!-- Bootstrap core JavaScript
  74. ================================================== -->
  75. <!-- Placed at the end of the document so the pages load faster -->
  76. <script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
  77. <script src="../../dist/js/bootstrap.min.js"></script>
  78. </body>
  79. </html>

comments powered by Disqus