Blogger Information
Blog 22
fans 0
comment 0
visits 17806
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
bootstrap列偏移,列嵌套,列排序
yestrue的博客
Original
944 people have browsed it
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>bootstrap基础</title>
<link rel="stylesheet" href="dist/css/bootstrap.css">
<script src="dist/js/jquery-3.2.1.min.js"></script>
<script src="dist/js/bootstrap.js"></script>

<style>
.grid{
border:1px solid #aaa;
background-color: skyblue;

}
.orange{
border:1px solid #aaa;
background-color: orange;

}
.green{
border:1px solid #aaa;
background-color: #59d200;
}
</style>
</head>
<body>
<div>
<!-- 偏移相当于添加了透明的栅格 -->
<h2>列偏移前</h2>
<div>
<div class="col-sm-4 grid">444</div>
<div class="col-sm-4 green">444</div>
</div>

<h2>列偏移后</h2>
<div>
<div class="col-sm-4 col-md-offset-1 grid">444</div>
<div class="col-sm-4 col-md-offset-3 green">444</div>
</div>
</div>
<div>
<!-- 在每列中继续添加行,以父列为12等分 -->
<h2>列嵌套前</h2>
<div>
<div class="col-sm-4 grid">444</div>
<div class="col-sm-4 green">444</div>
<div class="col-sm-4 green">444</div>
</div>

<h2>列嵌套后</h2>
<div>
<div class="col-sm-4  grid">444
<div>
<div class="col-sm-4  orange">444</div>
<div class="col-sm-4  green">444</div>
<div class="col-sm-4 orange">444</div>
</div>
</div>
<div class="col-sm-4  green">444
<div>
<div class="col-sm-4 orange">444</div>
<div class="col-sm-4 grid">444</div>
<div class="col-sm-4 orange">444</div>
</div>
</div>
</div>
</div>

<div>
<!-- 排序,相对于原来的位置 -->
<h2>列排序前</h2>
<div>
<div class="col-sm-6 grid">6666</div>
<div class="col-sm-4 green">4444</div>
<div class="col-sm-2 orange">2222</div>

</div>

<h2>列排序后</h2>
<div>
<div class="col-sm-6 col-sm-push-6 grid">6666</div>
<div class="col-sm-4 col-sm-pull-4 green">4444</div>
<div class="col-sm-2 col-sm-pull-10 orange">2222</div>
</div>
</div>
</body>
</html>


Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post