全网整合营销服务商

电脑端+手机端+微信端=数据同步管理

免费咨询热线:400-708-3566

Bootstrap导航条学习使用(二)

本文实例为大家分享了Bootstrap导航条实现的具体代码,供大家参考,具体内容如下

navbar-header:导航的头部,一般情况下用来放置logo
navbar-brand :用来放置logo,需要配合navbar-header使用

具体代码:

<!doctype html>
<html>
<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>Bootstrap</title>
 <link rel="stylesheet" href="css/bootstrap.css" rel="external nofollow" />
</head>
<body>
 <!--有链接和文字的导航条-->
 <nav class="navbar navbar-default">
 <div class="container"><!--将外围的div放在nav标签里面-->
  <div class="navbar-header">
  <a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" class="navbar-brand">logo</a><!--navbar-brand 用来放置logo的-->
  </div>
  <ul class="nav navbar-nav">
  <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >苹果</a></li>
  <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >香蕉</a></li>
  <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >橘子</a></li>
  </ul>
  <a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" class="navbar-link navbar-text">链接</a><!--navbar-link为导航里的链接-->
  <p class="navbar-text">这里是一段文字</p><!--navbar-text为导航里的文字-->
  <ul class="nav navbar-nav navbar-right"><!--右对齐,而navbar-left为左对齐-->
  <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >登录</a></li>
  <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >注册</a></li>
  </ul>
 </div>
 </nav>
 <!--有表单的导航条-->
 <nav class="navbar navbar-default">
 <div class="container">
  <div class="navbar-header">
  <a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" class="navbar-brand">logo</a>
  </div>
  <ul class="nav navbar-nav">
  <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >苹果</a></li>
  <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >香蕉</a></li>
  <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >橘子</a></li>
  </ul>
  <button class="btn btn-default navbar-btn navbar-left">搜索</button>

  <form action="URL" class="navbar-form navbar-left"><!--navbar-form是在导航条里添加表单,navbar-left使表单左浮动,使其与其他内容在一行显示-->
  <input type="text" class="form-control"/>
  <button class="btn btn-default">搜索</button>
  </form>
  <ul class="nav navbar-nav navbar-right">
  <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >登录</a></li>
  <li><a href="#" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >注册</a></li>
  </ul>
 </div>
 </nav>
 <script src="js/jquery-2.1.0.js"></script>
 <script src="js/bootstrap.js"></script>
</body>
</html>

效果图:

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。


# Bootstrap  # 导航条  # Bootstrap导航条鼠标悬停下拉菜单  # bootstrap导航条实现代码  # Bootstrap源码解读导航条(7)  # Bootstrap CSS组件之导航条(navbar)  # Bootstrap导航条的使用和理解3  # JS组件Bootstrap导航条使用方法详解  # Bootstrap入门书籍之(五)导航条、分页导航  # Bootstrap每天必学之导航条  # 第一次接触神奇的Bootstrap导航条  # 全面接触神奇的Bootstrap导航条实战篇  # 表单  # 是在  # 放在  # 使其  # 大家分享  # 具体内容  # 大家多多  # 为左  # 与其他  # 右对齐  # charset  # http  # utf  # meta  # gt  # head  # html  # width  # viewport 


相关文章: 公司门户网站制作公司有哪些,怎样使用wordpress制作一个企业网站?  制作旅游网站html,怎样注册旅游网站?  云南网站制作公司有哪些,云南最好的招聘网站是哪个?  如何通过商城免费建站系统源码自定义网站主题?  盘锦网站制作公司,盘锦大洼有多少5G网站?  jQuery 常见小例汇总  手机网站制作与建设方案,手机网站如何建设?  建站之星安装提示数据库无法连接如何解决?  高防网站服务器:DDoS防御与BGP线路的AI智能防护方案  小捣蛋自助建站系统:数据分析与安全设置双核驱动网站优化  常州自助建站费用包含哪些项目?  制作网站的公司有哪些,做一个公司网站要多少钱?  如何在阿里云ECS服务器部署织梦CMS网站?  如何用y主机助手快速搭建网站?  免费制作海报的网站,哪位做平面的朋友告诉我用什么软件做海报比较好?ps还是cd还是ai这几个软件我都会些我是做网页的?  兔展官网 在线制作,怎样制作微信请帖?  攀枝花网站建设,攀枝花营业执照网上怎么年审?  如何获取开源自助建站系统免费下载链接?  建站之星后台密码遗忘如何找回?  rsync同步时出现rsync: failed to set times on “xxxx”: Operation not permitted  广州网站建站公司选择指南:建站流程与SEO优化关键词解析  大连 网站制作,大连天途有线官网?  网站广告牌制作方法,街上的广告牌,横幅,用PS还是其他软件做的?  如何选择网络建站服务器?高效建站必看指南  合肥做个网站多少钱,合肥本地有没有比较靠谱的交友平台?  网站制作报价单模板图片,小松挖机官方网站报价?  实惠建站价格推荐:2025年高性价比自助建站套餐解析  济南网站建设制作公司,室内设计网站一般都有哪些功能?  ,sp开头的版面叫什么?  网页制作模板网站推荐,网页设计海报之类的素材哪里好?  建站之星安装模板失败:服务器环境不兼容?  如何快速搭建高效香港服务器网站?  魔毅自助建站系统:模板定制与SEO优化一键生成指南  岳西云建站教程与模板下载_一站式快速建站系统操作指南  建站主机默认首页配置指南:核心功能与访问路径优化  如何在阿里云虚拟机上搭建网站?步骤解析与避坑指南  子杰智能建站系统|零代码开发与AI生成SEO优化指南  如何通过西部建站助手安装IIS服务器?  如何用wdcp快速搭建高效网站?  如何配置FTP站点权限与安全设置?  TestNG的testng.xml配置文件怎么写  如何在局域网内绑定自建网站域名?  如何用手机制作网站和网页,手机移动端的网站能制作成中英双语的吗?  已有域名建站全流程解析:网站搭建步骤与建站工具选择  如何在建站宝盒中设置产品搜索功能?  网站制作公司排行榜,四大门户网站排名?  网站制作需要会哪些技术,建立一个网站要花费多少?  网站制作的方法有哪些,如何将自己制作的网站发布到网上?  网站制作软件免费下载安装,有哪些免费下载的软件网站?  深圳 网站制作,深圳招聘网站哪个比较好一点啊? 

您的项目需求

*请认真填写需求信息,我们会在24小时内与您取得联系。