<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width = device -width"/>
<title>Title</title>
<link href="../css/bootstrap.css" rel="stylesheet">
<style>
.col-6 {
width: 600px;
height: 300px;
border: solid red 1px;
}
.col-3{
width: 600px;
height:300px;
border: solid red 1px;
}
.rows-6{
height: 300px;
border: solid red 1px;
}
.col{
width: 600px;
height: 300px;
border: solid red 1px;
}
.row{
width: 600px;
border: solid red 1px;
}
</style>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-6"></div>
<div class="col-6"> <div class="row-6"></div> <div class="row-6"></div> </div>
</div>
<div class="row">
<div class="col-6"></div>
<div class="col-3"></div>
<div class="col-3"></div>
</div>
</div>
</body>
</html>
哈喽,代码如下:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width = device -width"/>
<title>Title</title>
<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
<!-- 可选的 Bootstrap 主题文件(一般不用引入) -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap-theme.min.css" integrity="sha384-6pzBo3FDv/PJ8r2KRkGHifhEocL+1X2rVCTTkUfGk7/0pbek5mMa1upzvWbrUbOZ" crossorigin="anonymous">
<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script>
<style>
.height400{
height:400px;
}
.height100{
height:100px;
}
.height200{
height:200px;
}
.border{
border: solid red 1px;
}
</style>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-md-6 border height400">.col-md-6</div>
<div class="col-md-6">
<div class="row">
<div class="col-md-12 border height200">.col-md-6 .col-md-12</div>
</div>
<div class="row">
<div class="col-md-6 border height200">.col-md-6 .col-md-6</div>
<div class="col-md-6">
<div class="row">
<div class="col-md-12 border height100">.col-md-6 .col-md-6 .col-md-12</div>
</div>
<div class="row">
<div class="col-md-12 border height100">.col-md-6 .col-md-6 .col-md-12</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 border height400">.col-md-6</div>
<div class="col-md-3">
<div class="row"> <div class="col-md-12 border height200">.col-md-3 .col-md-12</div></div>
<div class="row"> <div class="col-md-12 border height200">.col-md-3 .col-md-12</div></div>
</div>
<div class="col-md-3 border height400">.col-md-3</div>
</div>
</div>
</body>
</html>