使用 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>

更新時間:2020 年 6 月 12 日

325 次瀏覽

開啟您的 職業生涯

完成課程並獲得認證

開始學習
廣告