在Bootstrap中嵌套列
要将内容与默认网格嵌套在一起,请在现有的.col-md-*列中添加一个新的.row和一组.col-md-*列。
您可以尝试运行以下代码以了解如何在Bootstrap中实现嵌套列-
示例
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap Example</title>
<link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<script src = "/scripts/jquery.min.js"></script>
<script src = "/bootstrap/js/bootstrap.min.js"></script>
</head>
<body>
<div class = "box">
<h1>Heading</h1>
<div class = "row">
<div class = "col-md-3" style = "background-color: gray; color: white;
box-shadow: inset 1px -1px 1px #444, inset -1px 1px 1px #444;">
<h4>Heading</h4>
<p>This is demo text.</p>
</div>
<div class = "col-md-9" style = "background-color: gray;color: white;
box-shadow: inset 1px -1px 1px #444, inset -1px 1px 1px #444;">
<h4>Heading</h4>
<p>This is demo text.</p>
<div class = "row">
<div class = "col-md-6" style = "background-color: orange;
box-shadow: inset 1px -1px 1px #444, inset -1px 1px 1px #444;">
<p>This is box 1.</p>
</div>
<div class = "col-md-6" style = "background-color: orange;
box-shadow: inset 1px -1px 1px #444, inset -1px 1px 1px #444;">
<p>This is box 2.</p>
</div>
</div>
<div class = "row">
<div class = "col-md-6" style = "background-color: orange;
box-shadow: inset 1px -1px 1px #444, inset -1px 1px 1px #444;">
<p>This is box 3.</p>
</div>
<div class = "col-md-6" style = "background-color: orange;
box-shadow: inset 1px -1px 1px #444, inset -1px 1px 1px #444;">
<p>This is box 4.</p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>热门推荐
3 祝福语简短的微信
10 幼儿祝福语大全简短贺卡
11 感谢教官文案祝福语简短
12 鼠年同事祝福语简短创意
13 元旦祝福语 简短独特群发
14 妈咪跟我生日祝福语简短
15 给儿子新婚祝福语简短
16 伴娘祝福语长文案简短
17 恭喜高考完祝福语简短
18 生日祝福语送老公简短