代码示例:(标识:bs_grid_examples_4)
<!DOCTYPE html>
<html lang="en">
<head>
  <title>Bootstrap 实例</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.1.2/css/bootstrap.min.css" rel="stylesheet">
  <script src="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.1.2/js/bootstrap.bundle.js"></script>
</head>
<body>

<div class="container-fluid mt-3">
  <h2>设置一列宽度</h2>
  <p>只设置一列的宽度就足够了,并让兄弟列在周围自动调整尺寸。下例将创建 25%/50%/25% 的拆分:</p>
  <div class="row">
    <div class="col bg-success">.col</div>
    <div class="col-6 bg-warning">.col-6</div>
    <div class="col bg-success">.col</div>
  </div>
</div>

</body>
</html>
运行结果: