代码如下:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<!--最新版本的Bootstrap核心css文件-->
<link rel="stylesheet" href="css/bootstrap.css" />
<!--最新的Bootstrap核心JavaScript文件-->
<script type="text/javascript" src="js/jquery-1.11.0.js"></script>
<!--需要引入JQuery-->
<script type="text/javascript" src="js/bootstrap.js"></script>
<meta name="viewport" content="width=device-width,initial-scale=1" />
<!--
引入bootstrap相关的头文件
1.div布局容器 class = " container"
2.放8行 row
-->
</head>
<body>
<!--最外层的布局容器-->
<div class="container">
<!--LOGO部分-->
<div class="row">
<div class="col-md-4">
<img src="img/logo2.png">
</div>
<div class="col-md-4">
<img src="img/header.png">
</div>
<div class="col-md-4" style="line-height: 50px;height: 50px;">
<a href="#">登录</a>
<a href="#">注册</a>
<a href="#">购物车</a>
</div>
</div>
<!--导航栏部分-->
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<!--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">
<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="#">首页</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">
<li class="active">
<a href="#">手机数码<span class="sr-only">(current)</span></a>
</li>
<li>
<a href="#">电脑办公</a>
</li>
<li>
<a href="#">鞋靴