源代码:
下载代码
AI 编程工具
点击运行
<!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.net/twitter-bootstrap/5.1.1/css/bootstrap.min.css" rel="stylesheet"> <script src="https://cdn.staticfile.net/twitter-bootstrap/5.1.1/js/bootstrap.bundle.min.js"></script> </head> <body> <div class="container-fluid mt-3"> <h1>不等宽响应式列</h1> <p>重置浏览器大小查效果。</p> <p>在移动设备上,即屏幕宽度小于 576px 时,两个列将会上下堆叠排版。</p> <div class="row"> <div class="col-sm-4 p-3 bg-primary text-white">.col</div> <div class="col-sm-8 p-3 bg-dark text-white">.col</div> </div> </div> </body> </html>
运行结果: