实例首页
自学教程
IT工具箱
源代码
下载代码
左右布局
点击运行 >
<!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> <h2>独立列类</h2> <div class="container mt-3 text-center"> <div class="col-3 p-3 mb-2 bg-secondary"> .col-3: width of 25% </div> <div class="col-sm-9 p-3 bg-info"> .col-sm-9: width of 75% above sm breakpoint </div> </div> </body> </html>
运行结果: