代码示例:(标识:bs_grid_stacked_to_hor_2)
<!DOCTYPE html>
<html lang="en">
<head>
  <title>Bootstrap Example</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="p-4">
  <h1>网格实例</h1>
  <p>本例演示了在小型、中型、大型、xlarge 和 xxlarge 设备上的 50%/50% 拆分。在超小型设备上,它将堆叠(100% 宽度)。</p>
  <p>请调整浏览器窗口大小来查看效果。</p> 
  <div class="row">
    <div class="col-sm-6 bg-primary text-white p-3">
      Lorem ipsum...
    </div>
    <div class="col-sm-6 bg-dark text-white p-3">
      Sed ut perspiciatis...
    </div>
  </div>
</div>

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