温馨提醒
如果文章内容或图片资源失效,请留言反馈,我们会及时处理,谢谢
本文最后更新于2023年9月27日,已超过 180天没有更新
引入文件,这是需要自己去官网下载的
<link rel="stylesheet" type="text/css" href="../css/bootstrap.min.css" /> <script src="../js/jquery.js" type="text/javascript" charset="utf-8"></script> <script src="../js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
HTML部分
navbar-fixed-top:使导航条固定在头部
<div class="container-fluid"> <div class="row"> <nav class="navbar navbar-fixed-top navbar-default"> <div class="container"> <!-- Brand and toggle get grouped for better mobile display --> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="#"><b>xx学院</b></a> </div> <!-- Collect the nav links, forms, and other content for toggling --> <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> <ul class="nav navbar-nav navbar-right"> <li class="dropdown"> <li> <a href="index.html"><b>xx首页</b> <span class="sr-only">(current)</span></a> </li> <li> <a href="index.html"><b>xx博客</b> <span class="sr-only">(current)</span></a> </li> <li> <a href="index.html"><b>前端开发</b> <span class="sr-only">(current)</span></a> </li> <li> <a href="index.html"><b>最新课程</b> <span class="sr-only">(current)</span></a> </li> <li> <a href="index.html"><b>移动APP</b> <span class="sr-only">(current)</span></a> </li> <li> <a href="#"><b>联系我们</b></a> </li> </li> </ul> </div> </div> </nav> </div> </div>
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。
评论0+