使用 Bootstrap 的小型输入组
若要使用 Bootstrap 设置小型输入组,请使用 .input-group-sm 类。
你可以尝试运行以下代码,从而实现 .input-group-sm 类;
示例
<!DOCTYPE html> <html> <head> <title>Bootstrap Example</title> <link href = "/bootstrap/css/bootstrap.min.css" rel = "stylesheet"> <script src = "/scripts/jquery.min.js"></script> <script src = "/bootstrap/js/bootstrap.min.js"></script> </head> <body> <div class = "container"> <h1>Search</h1> <form> <div class = "input-group input-group-sm"> <input type = "text" class = "form-control" placeholder = "Search here..."> <div class = "input-group-btn"> <button class = "btn btn-primary" type = "submit"> </button> </div> </div> </form> </div> </body> </html>
广告