通过BootStrap框架制作商城⽹页
BootStrap框架 通过官⽹查询代码实现内容
<!DOCTYPE html>
<html>
<head>
jquery框架定义
<meta charset="UTF-8">
<title></title>
<!-- 最新版本的 Bootstrap 核⼼ CSS ⽂件 -->
<link rel="stylesheet"href="../css/bootstrap.css"/>
<!--需要引⼊JQuery-->
<script type="text/javascript"src="../js/jquery-1.11.0.js"></script>
<!-- 最新的 Bootstrap 核⼼ JavaScript ⽂件 -->
<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 col-sm-6 col-xs-6">
<img src="../img/sc.jpg" />
</div>
<div class="col-md-4 hidden-sm hidden-xs">
<img src="../img/header.png"/>
</div>
<div class="col-md-4 col-sm-6 col-xs-6" >
<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>
<a href="#">⼿机数码<span class="sr-only">(current)</span></a>
</li>
<li>
<a href="#">电脑办公</a>
</li>
<li>
<a href="#">鞋靴箱包</a>
</li>
<li>
<a href="#">⾹烟酒⽔</a>
</li>
<li class="dropdown">
<a href="#"class="dropdown-toggle"data-toggle="dropdown"role="button"aria-expanded="false">全部分类<span class="caret"></span></a>
<ul class="dropdown-menu"role="menu">
<li>
<a href="#">⼿机数码</a>
</li>
<li>
<a href="#">电脑办公</a>
</li>
<li>
<a href="#">鞋靴箱包</a>
</li>
<li class="divider"></li>
<li>
<a href="#">⾹烟酒⽔</a>
</li>
<li class="divider"></li>
<li>
<a href="#">花⽣⽠⼦</a>
</li>
</ul>
</li>
</ul>
<form class="navbar-form navbar-right"role="search">
<div class="form-group">
<input type="text"class="form-control"placeholder="Search">
</div>
<button type="submit"class="btn btn-default">Submit</button>
</form>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container-fluid -->
</nav>
<!--轮播图-->
<div id="carousel-example-generic"class="carousel slide"data-ride="carousel"data-interval="1000">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#carousel-example-generic"data-slide-to="0"class="active"></li>
<li data-target="#carousel-example-generic"data-slide-to="1"></li>
<li data-target="#carousel-example-generic"data-slide-to="2"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner"role="listbox">
<div class="item active">
<img src="../img/1.jpg"alt="...">
<div class="carousel-caption">
...
</div>
</div>
<div class="item">
<div class="item">
<img src="../img/2.jpg"alt="...">
<div class="carousel-caption">
...
</div>
</div>
<div class="item">
<img src="../img/3.jpg"alt="...">
<div class="carousel-caption">
...
</div>
</div>
</div>
<!-- Controls -->
<a class="left carousel-control"href="#carousel-example-generic"role="button"data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control"href="#carousel-example-generic"role="button"data-slide="next">
<span class="glyphicon glyphicon-chevron-right"aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
<!--最新商品-->
<div class="row">
<div class="col-md-12">
<h3>最新商品<img src="../images/title2.jpg"/></h3>
</div>
</div>
<!--商品部分-->
<div class="row">
<!--左边⼤图部分-->
<div class="col-md-2 hidden-sm hidden-xs" >
<img src="../products/hao/big01.jpg"width="100%"height="100%"/>
</div>
<!--
右边商品项部分
-->
<div class="col-md-10">
<!--投影神券来袭-->
<div class="col-md-6 hidden-sm hidden-xs" >
<img src="../products/hao/middle01.jpg" />
</div>
<div class="col-md-2 col-sm-4 col-xs-6" >
<img src="../products/hao/small01.jpg" />
<p>微波炉</p>
<p >$998</p>
</div>
<div class="col-md-2 col-sm-4 col-xs-6" >
<img src="../products/hao/small02.jpg"/>
<p>微波炉</p>
<p >$998</p>
</div>
<div class="col-md-2 col-sm-4 col-xs-6" >
<img src="../products/hao/small03.jpg"/>
<p>微波炉</p>
<p >$998</p>
</div>
<div class="col-md-2 col-sm-4 col-xs-6" >
<img src="../products/hao/small04.jpg"/>
<p>微波炉</p>
<p >$998</p>
</div>
<div class="col-md-2 col-sm-4 col-xs-6" > <img src="../products/hao/small05.jpg"/>
<p>微波炉</p>
<p >$998</p>
</div>
<div class="col-md-2 col-sm-4 col-xs-6" > <img src="../products/hao/small06.jpg"/>
<p>微波炉</p>
<p >$998</p>
</div>
<div class="col-md-2 col-sm-4 col-xs-6" > <img src="../products/hao/small07.jpg"/>
<p>微波炉</p>
<p >$998</p>
</div>
<div class="col-md-2 col-sm-4 col-xs-6" > <img src="../products/hao/small08.jpg"/>
<p>微波炉</p>
<p >$998</p>
</div>
<div class="col-md-2 col-sm-4 col-xs-6" > <img src="../produc
ts/hao/small09.jpg"/>
<p>微波炉</p>
<p >$998</p>
</div>
</div>
</div>
<!--LOGO部分-->
<div class="row">
<div class="col-md-12">
<img src="../products/hao/ad.jpg"width="100%"/>
</div>
</div>
<!--最新商品-->
<div class="row">
<div class="col-md-12">
<h3>最新商品<img src="../images/title2.jpg"/></h3>
</div>
</div>
<!--商品部分-->
<div class="row">
<!--左边⼤图部分-->
<div class="col-md-2 hidden-sm hidden-xs" >
<img src="../products/hao/big01.jpg"/>
</div>
<!--
右边商品项部分
-->
<div class="col-md-10">
<!--投影神券来袭-->
<div class="col-md-6 hidden-sm hidden-xs" >
<img src="../products/hao/middle01.jpg"/>
</div>
<div class="col-md-2 col-sm-4 col-xs-6" > <img src="../products/hao/small09.jpg"/>
<p>微波炉</p>
<p >$998</p>
</div>
<div class="col-md-2 col-sm-4 col-xs-6" > <img src="../products/hao/small08.jpg"/>
<p>微波炉</p>
<p >$998</p>
</div>
<div class="col-md-2 col-sm-4 col-xs-6" > <img src="../products/hao/small07.jpg"/>
<p>微波炉</p>
<p >$998</p>
</div>
<div class="col-md-2 col-sm-4 col-xs-6" > <img src="../products/hao/small06.jpg"/>
<p>微波炉</p>
<p >$998</p>
</div>
<div class="col-md-2 col-sm-4 col-xs-6" > <img src="../products/hao/small05.jpg"/>
<p>微波炉</p>
<p >$998</p>
</div>
<div class="col-md-2 col-sm-4 col-xs-6" > <img src="../produc
ts/hao/small04.jpg"/>
<p>微波炉</p>
<p >$998</p>
</div>
<div class="col-md-2 col-sm-4 col-xs-6" > <img src="../products/hao/small03.jpg"/>
<p>微波炉</p>
<p >$998</p>
</div>
<div class="col-md-2 col-sm-4 col-xs-6" > <img src="../products/hao/small02.jpg"/>
<p>微波炉</p>
<p >$998</p>
</div>
<div class="col-md-2 col-sm-4 col-xs-6" > <img src="../products/hao/small01.jpg"/>
<p>微波炉</p>
<p >$998</p>
</div>
</div>
</div>
<!-- footer -->
<div class="row">
<div class="col-md-12">
<img src="../img/footer.jpg"width="100%"/>
</div>

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。