Runoops Demo
Bootstrap5 实例
实例首页
自学教程
效率工具箱
源代码
外部库
0
重置
下载
左右布局
运行
<!DOCTYPE html> <html> <head> <title>Bootstrap5 实例</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="https://cdn.staticfile.org/twitter-bootstrap/5.1.1/css/bootstrap.min.css" rel="stylesheet"> <script src="https://cdn.staticfile.org/twitter-bootstrap/5.1.1/js/bootstrap.bundle.min.js"></script> </head> <body> <div class="container-fluid mt-3"> <h1>平板与桌面的网格布局</h1> <p>以下实例演示了在桌面设备的显示器上两个列的宽度各占 50%,如果在平板端则左边的宽度为 25%,右边的宽度为 75%, 在移动手机等小型设备上会堆叠显示。 </p> <p>重置浏览器窗口大小,查看效果。</p> <div class="row"> <div class="col-sm-3 col-md-6 col-lg-4 col-xl-2 p-3 bg-primary text-white">.col</div> <div class="col-sm-9 col-md-6 col-lg-8 col-xl-10 p-3 bg-dark text-white">.col</div> </div> </div> </body> </html>
运行结果
刷新
放大
全屏
外部库
搜索并选择 CDN 库,将自动写入源代码(可再手动调整)
关闭
staticfileCDN
cloudflareCDN
添加