使用 Bootstrap 將按鈕大小設為小


要製作一個小按鈕,請使用 .btn-sm Bootstrap 類。

您可以嘗試執行以下程式碼,以將按鈕尺寸設為小:

示例

現場演示

<!DOCTYPE html>
<html>
   <head>
      <title>Bootstrap Example</title>
      <meta name = "viewport" content = "width=device-width, initial-scale = 1">
      <link rel = "stylesheet" href = "https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css">
      <script src = "https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
      <script src = "https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
   </head>
   <body>
      <button type = "button" class = "btn btn-default btn-sm">
         Small button
      </button>
   </body>
</html>

更新時間:2020 年 6 月 12 日

2K+ 次瀏覽

啟動你的職業生涯

完成課程即可取得認證

開始
廣告