bootstrap实现首页排版

时间:2019-02-11
本文章向大家介绍bootstrap实现首页排版,主要包括bootstrap实现首页排版使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>导航条</title>
		<link rel="stylesheet" href="css/bootstrap.css" />
		<script type="text/javascript" src="js/jquery-1.11.0.js" ></script>
		<script type="text/javascript" src="js/bootstrap.js" ></script>
		<meta name="viewport" content="width=device-width, initial-scale=1">
	</head>
	<body>
		<div class="container">
			<nav class="navbar navbar-inverse">
				<div class="container-fluid">
			
					<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>
					<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="#">鞋靴箱包</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"></a>
								<ul class="dropdown-menu" role="menu">
									<li>
										<a href="#">手机数码 </a>
									</li>
									<li>
										<a href="#">电脑办公</a>
									</li>
									<li>
										<a href="#">鞋靴箱包</a>
									</li>
									<li>
										<a href="#">香烟酒水</a>
									</li>
								</ul>
							</li>
						</ul>
						
						<form class="navbar-form navbar-right">
							<div class="form-group">
								<input type="text" class="form-control" placeholder="search" />
							</div>
							<button type="submit" class="btn btn-default" >提交</button>
						</form>
					</div>
				</div>
			</nav>
				
				<div id="bs-example-navbar-collapse-1" class="carousel slide" data-ride="carousel" data-interval="500">
					<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="0"></li>
						<li data-target="#carousel-example-generic" data-slide-to="0"></li>
					</ol>
					<div class="carousel-inner" role="listbox">
						<div class="item active">
							<img src="img/1.jpg" alt="..." />
							<div class="carousel-caption">
								<h3>电脑大促销</h3>
								<p>黑马出品电脑黑马出品电脑黑马出品电脑</p>
							</div>
						</div>
						<div class="item">
							<img src="img/2.jpg" alt="..." />
							<div class="carousel-caption">
								<h3>电脑大促销</h3>
								<p>黑马出品电脑黑马出品电脑黑马出品电脑</p>
							</div>
						</div>
						<div class="item">
							<img src="img/3.jpg" alt="..." />
							<div class="carousel-caption">
								<h3>电脑大促销</h3>
								<p>黑马出品电脑黑马出品电脑黑马出品电脑</p>
							</div>
						</div>
						<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>
				
				<div class="row">
					<div class="col-md-4">
						<h3>电脑大促销</h3>
						<p>黑马出品电脑黑马出品电脑黑马出品电脑黑马出品电脑黑马出品电脑黑马出品电脑黑马出品电脑黑马出品电脑黑马出品电脑黑马出品电脑黑马出品电脑黑马出品电脑</p>
						<a role="button" class="btn btn-danger pull-right">了解更多</a>
					</div>
					<div class="col-md-4">
						<h3>电脑大促销</h3>
						<p>黑马出品电脑黑马出品电脑黑马出品电脑黑马出品电脑黑马出品电脑黑马出品电脑黑马出品电脑黑马出品电脑黑马出品电脑黑马出品电脑黑马出品电脑黑马出品电脑</p>
						<a role="button" class="btn btn-info pull-right">了解更多</a>
					</div>
					<div class="col-md-4">
						<h3>电脑大促销</h3>
						<p>黑马出品电脑黑马出品电脑黑马出品电脑黑马出品电脑黑马出品电脑黑马出品电脑黑马出品电脑黑马出品电脑黑马出品电脑黑马出品电脑黑马出品电脑黑马出品电脑</p>
						<a role="button" class="btn btn-warning pull-right">了解更多</a>
					</div>
				</div>
		</div>
		
		
		<!--内容-->
		<div class="container">
			<div class="row">
				<div class="col-md-2">
					<img src="img/big01.jpg" />
				</div>
				<div class="col-md-10">
					<div class="col-md-6">
						<img src="img/middle01.jpg" />
					</div>
					<div class="col-md-2" style="text-align: center;height: 240px;">
						<img src="img/small05.jpg" />
						<p>饮水机</p>
						<font color="red">¥199</font>
					</div>
					<div class="col-md-2" style="text-align: center;height: 240px;">
						<img src="img/small05.jpg" />
						<p>饮水机</p>
						<font color="red">¥199</font>
					</div>
					<div class="col-md-2" style="text-align: center;height: 240px;">
						<img src="img/small05.jpg" />
						<p>饮水机</p>
						<font color="red">¥199</font>
					</div>
					<div class="col-md-2" style="text-align: center;height: 240px;">
						<img src="img/small05.jpg" />
						<p>饮水机</p>
						<font color="red">¥199</font>
					</div>
					<div class="col-md-2" style="text-align: center;height: 240px;">
						<img src="img/small05.jpg" />
						<p>饮水机</p>
						<font color="red">¥199</font>
					</div>
					<div class="col-md-2" style="text-align: center;height: 240px;">
						<img src="img/small05.jpg" />
						<p>饮水机</p>
						<font color="red">¥199</font>
					</div>
					<div class="col-md-2" style="text-align: center;height: 240px;">
						<img src="img/small05.jpg" />
						<p>饮水机</p>
						<font color="red">¥199</font>
					</div>
					<div class="col-md-2" style="text-align: center;height: 240px;">
						<img src="img/small05.jpg" />
						<p>饮水机</p>
						<font color="red">¥199</font>
					</div>
					<div class="col-md-2" style="text-align: center;height: 240px;">
						<img src="img/small05.jpg" />
						<p>饮水机</p>
						<font color="red">¥199</font>
					</div>
				</div>
			</div>
			
			<!--foot-->
			<div class="row">
				<div class="col-md-12">
					<img src="img/footer.jpg" width="100%" />
				</div>
			</div>
			
			<div style="text-align: center;">
				<a href="#">关于我们</a>
				<a href="#">联系我们</a>
				<a href="#">招贤纳士</a>
				<a href="#">法律声明</a>
				<a href="#">友情链接</a>
				<a href="#">支付方式</a>
				<a href="#">配送方式</a>
				<a href="#">服务声明</a>
				<a href="#">广告声明</a>
			</div>
		</div>
		
	</body>
</html>

 

上一页 下一页

原文地址:http://www.manongjc.com/article/51181.html