流体容器container-fluid
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>流体容器</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/css/bootstrap.min.css">
<style type="text/css">
.container-fluid{
background: red;
}
</style>
</head>
<body>
<div class="container-fluid">
test
</div>
</body>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script
<script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
</html>
结果如下
固定容器container
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>固定容器</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/css/bootstrap.min.css">
<style type="text/css">
.container{
background: yellow;
}
</style>
</head>
<body>
<div class="container">
simple
</div>
</body>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script
<script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
</html>
结果如下