BootStrap实现商城页面前端效果------商城项目前端
精选
原创
©著作权归作者所有:来自51CTO博客作者旧约Alatus的原创作品,请联系作者获取转载授权,否则将追究法律责任
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<!-- 引入Jquery,因为bootstrap中有jquery的插件 -->
<!-- 必须先引入jquery,然后引入bootstrap -->
<script src="jquery/jquery-3.6.1.js" type="text/javascript"></script>
<!-- 引入bootstrap -->
<link type="text/css" rel="stylesheet" href="bootstrap/css/bootstrap.css"/>
<!-- 引入bootstrap的js文件 -->
<script type="text/javascript" src="bootstrap/js/bootstrap.js"></script>
</head>
<body>
<!-- 导航栏部分 -->
<nav class="navbar navbar-default">
<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" 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="#">
<span class="glyphicon glyphicon-home" aria-hidden="true">主页
</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="glyphicon glyphicon-gift" aria-hidden="true"></span>折扣商品
<span class="sr-only">(current)</span></a></li>
<li><a href="#">
<span class="glyphicon glyphicon-heart" aria-hidden="true"></span>时季热销
</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">商品品类<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#">美食生鲜</a></li>
<li><a href="#">数码产品</a></li>
<li><a href="#">家用电器</a></li>
<li><a href="#">日常百货</a></li>
<li><a href="#">美妆好物</a></li>
<li role="separator" class="divider"></li>
<li><a href="#">海外专场</a></li>
</ul>
</li>
</ul>
<form class="navbar-form navbar-left">
<div class="form-group">
<input type="text" class="form-control" placeholder="键入搜索">
</div>
<button type="submit" class="btn btn-default">搜索</button>
</form>
<ul class="nav navbar-nav navbar-right">
<li><a href="#">
<span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span>1
</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
<span class="glyphicon glyphicon-user" aria-hidden="true"></span>我的账号
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#">
<span class="glyphicon glyphicon-tasks" aria-hidden="true"></span>个人中心
</a></li>
<li><a href="#">
<span class="glyphicon glyphicon-tag" aria-hidden="true"></span>我的订单
</a></li>
<li><a href="#">
<span class="glyphicon glyphicon-heart-empty" aria-hidden="true"></span>我的收藏
</a></li>
<li role="separator" class="divider"></li>
<li><a href="#">退出登录</a></li>
</ul>
</li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
<!-- 介绍信息部分 -->
<div class="jumbotron">
<h1>新春佳节, 热销进行时!</h1>
<p>超多优惠限时推出, 最低一折起.</p>
<p><a class="btn btn-primary btn-lg" href="#" role="button">了解更多</a></p>
</div>
<!-- 商品展示信息 -->
<div class="page-header">
<h1>热销单品<small>为您推荐</small></h1>
</div>
<!-- 商品信息 -->
<div>
<div class="row">
<div class="col-sm-6 col-md-4">
<div class="thumbnail">
<img src="img/1.jpg" alt="...">
<div class="caption">
<h3>丹麦曲奇饼干</h3>
<p>正宗丹麦进口曲奇饼干,新鲜牛乳黄油,只为醇香滋味</p>
<p><a href="#" class="btn btn-primary" role="button">详情</a> <a href="#" class="btn btn-default" role="button">加入购物车</a></p>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-md-4">
<div class="thumbnail">
<img src="img/1.jpg" alt="...">
<div class="caption">
<h3>丹麦曲奇饼干</h3>
<p>正宗丹麦进口曲奇饼干,新鲜牛乳黄油,只为醇香滋味</p>
<p><a href="#" class="btn btn-primary" role="button">详情</a> <a href="#" class="btn btn-default" role="button">加入购物车</a></p>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-md-4">
<div class="thumbnail">
<img src="img/1.jpg" alt="...">
<div class="caption">
<h3>丹麦曲奇饼干</h3>
<p>正宗丹麦进口曲奇饼干,新鲜牛乳黄油,只为醇香滋味</p>
<p><a href="#" class="btn btn-primary" role="button">详情</a> <a href="#" class="btn btn-default" role="button">加入购物车</a></p>
</div>
</div>
</div>
</div>
</div>
<nav aria-label="...">
<ul class="pager">
<li><a href="#">上一页</a></li>
<li><a href="#">下一页</a></li>
</ul>
</nav>
<!-- 页尾 -->
<div align="center">
<h3><span class="glyphicon glyphicon-headphones" aria-hidden="true"></span>联系我们
<span class="label label-default">
Info
</span></h3>
<div class="page-header">
<h4><span class="glyphicon glyphicon-earphone" aria-hidden="true"></span>联系电话:
<small>123456789</small></h4>
<h4><span class="glyphicon glyphicon-envelope" aria-hidden="true"></span>邮箱:
<small>123456@qq.com</small></h4>
</div>
</div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<script src="jquery/jquery-3.6.1.js" type="text/javascript"></script>
<!-- 引入bootstrap -->
<link type="text/css" rel="stylesheet" href="bootstrap/css/bootstrap.css"/>
<!-- 引入bootstrap的js文件 -->
<script type="text/javascript" src="bootstrap/js/bootstrap.js"></script>
</head>
<body>
<div class="jumbotron">
<div class="page-header" align="center">
<h1>注册<small>立享优质服务</small></h1>
<p class="text-primary"><a href="#">已有帐号?点击登录</a></p>
</div>
<form>
<div class="form-group">
<label for="exampleInputEmail1">用户名</label>
<input type="text" class="form-control" id="exampleInputEmail1" placeholder="请设置用户名">
</div>
<div class="form-group">
<label for="exampleInputPassword1">手机号</label>
<input type="password" class="form-control" id="exampleInputPassword1" placeholder="可用于找回和修改密码">
</div>
<div class="form-group">
<label for="exampleInputPassword1">密码</label>
<input type="password" class="form-control" id="exampleInputPassword1" placeholder="请设置登陆密码">
</div>
<div class="checkbox" align="center">
<label>
<input type="checkbox">
阅读并接受<a href="#">《商城用户协议》</a>、
<a href="#">《儿童个人信息保护声明》</a>及
<a href="#">《用户隐私权保护声明》</a>
</label>
<br><br><br>
<p><a class="btn btn-primary btn-lg" href="#" role="button">点击注册</a></p>
</div>
</form>
</div>
</body>
</html>