小编给大家分享一下bootstrap响应式导航条模板怎么用,希望大家阅读完这篇文章之后都有所收获,下面让我们一起去探讨吧!
具体内容如下
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Document</title> <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" > <!--[if lt IE 9]> <script src="js/html5shiv.js"></script> <script src="js/respond.min.js"></script> <![endif]--> <!-- 设置距离顶部的距离,固定定位会挡住内容区 --> <style type="text/css"> body{ margin-top: 50px; } </style> </head> <body> <div class="navbar navbar-inverse navbar-fixed-top" id="menu-nav"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <!-- sr-only仅阅读器能见实际不会呈现在页面上 --> <span class="sr-only">切换导航</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="#">浏览器</a> </div> <div class="navbar-collapse collapse"> <ul class="nav navbar-nav"> <li class="active"><a href="#ad-carousel">综述</a></li> <li><a href="#summary-container">简述</a></li> <!-- 下拉菜单 --> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">特点 <span class="caret"></span></a> <ul class="dropdown-menu"> <!-- href="#feature-tab"绑定详情页ID可定位 data-tab可以使用TAB切换选项 --> <li><a href="#feature-tab" data-tab="tab-chrome">Chrome</a></li> <li><a href="#feature-tab" data-tab="tab-firefox">Firefox</a></li> <li><a href="#feature-tab" data-tab="tab-safari">Safari</a></li> <li><a href="#feature-tab" data-tab="tab-opera">Opera</a></li> <li><a href="#feature-tab" data-tab="tab-ie">IE</a></li> </ul> </li> <li> <a href="#" data-toggle="modal" data-target="#about-modal">关于</a> </li> </ul> </div> </div> </div> <!-- 弹出框 放在body下保证层级最高--> <div class="modal fade" id="about-modal"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> <h5 class="modal-title" id="myModalLabel">标题</h5> </div> <div class="modal-body">文本</div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button> <button type="button" class="btn btn-primary">提交</button> </div> </div> </div> </div> <h2 class="text-center">你好</h2> </body> <script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script> <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js" ></script> </html>
看完了这篇文章,相信你对“bootstrap响应式导航条模板怎么用”有了一定的了解,如果想了解更多相关知识,欢迎关注亿速云行业资讯频道,感谢各位的阅读!
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。