源代码 -->
左右布局
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 mt-3"> <h2>输入框大小</h2> <p>我们可以通过在 .form-control 输入框中使用 .form-control-lg 或 .form-control-sm 类来设置输入框的大小:</p> <form> <input type="text" class="form-control form-control-lg" placeholder="大号输入框"> <input type="text" class="form-control mt-3" placeholder="正常大小输入框"> <input type="text" class="form-control form-control-sm mt-3" placeholder="小号输入框"> </form> </div> </body> </html>
运行结果