bootstrap
中文官方地址:https://v3.bootcss.com/
引入的时候需要引入css+js文件
引入方式可以用 官方cdn上的文件,也可以下载下来引入本地的文件
第一步:https://v3.bootcss.com/getting-started/
<!DOCTYPE html>
<html>
<head>
<title>boostrap练习</title>
<Meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" media="screen" href="main.css" />
<script src="main.js"></script>
<!-- 最新版本的 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 核心 JavaScript 文件 -->
<script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script>
</head>
<body>
<div class="row">
<div class="col-md-3" style="background-color: rgb(24, 5, 8)">
miao
</div>
<div class="col-md-6" style="background-color: rgb(22, 14, 99)">
miao
</div>
<div class="col-md-3" style="background-color: rgb(177, 113, 123)">
miao
</div>
</div>
</body>
</html>
Bootstrap 提供了一套响应式、移动设备优先的流式栅格系统,随着屏幕或视口(viewport)尺寸的增加,系统会自动分为最多12列。它包含了易于使用的预定义类,还有强大的mixin 用于生成更具语义的布局。
<!DOCTYPE html>
<html>
<head>
<Meta charset="utf-8" />
<Meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>boostrap练习</title>
<Meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" media="screen" href="main.css" />
<script src="main.js"></script>
<!-- 最新版本的 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 核心 JavaScript 文件 -->
<script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script>
</head>
<body>
<div class="row">
<div class="col-md-3" style="background-color: rgb(228, 34, 63)">
3
</div>
<div class="col-md-6" style="background-color: rgb(22, 14, 99)">
<div class="row">
<div class="col-md-3" style="background-color: rgb(236, 221, 224)">
3
</div>
<div class="col-md-6" style="background-color: rgb(14, 99, 21)">
6
</div>
<div class="col-md-3" style="background-color: rgb(196, 182, 184)">
3
</div>
</div>
</div>
<div class="col-md-3" style="background-color: rgb(177, 113, 123)">
3
</div>
</div>
</body>
</html>
第三步 实现输入框
<!DOCTYPE html>
<html>
<head>
<Meta charset="utf-8" />
<Meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>boostrap练习</title>
<Meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" media="screen" href="main.css" />
<script src="main.js"></script>
<!-- 最新版本的 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 核心 JavaScript 文件 -->
<script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous"></script>
</head>
<body>
<div class="row">
<div class="col-md-3" style="background-color: rgb(228, 34, 63)">
3
</div>
<div class="col-md-6" >
<div class="row">
<div class="form-group col-md-6">
<label for="exampleInputEmail1">请输入姓名:</label>
<input type="姓名" class="form-control" id="exampleInputEmail1" placeholder="Email">
</div>
</div>
<div class="row">
<div class="form-group col-md-6">
<label for="exampleInputEmail1">请输入年龄:</label>
<input type="年龄" class="form-control" id="exampleInputEmail1" placeholder="Email">
</div>
</div>
</div>
<div class="col-md-3" style="background-color: rgb(177, 113, 123)">
3
</div>
</div>
</body>
</html>