在 Bootstrap 中使用藍色背景色來模擬一個按下按鈕的效果


要新增藍色背景色以模擬按下按鈕,請使用 Bootstrap 中的主按鈕,如以下程式碼所示:-

示例

線上演示

<!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">
         <h2>Score</h2>
         <button type = "button" class = "btn btn-primary">Result (2018)</button>
         <button type = "button" class = "btn btn-primary disabled">Result (2017)</button>
      </div>
   </body>
</html>

更新於:2020 年 6 月 12 日

145 次瀏覽

開啟你的 職業生涯

透過完成課程獲得認證

開始
廣告
© . All rights reserved.