建立使用 Bootstrap 的類似連結的按鈕


在 Bootstrap 中使用 .btn-link 類,建立類似連結的按鈕。

嘗試執行以下程式碼來實現 .btn-link 類

示例

線上演示

<!DOCTYPE html>
<html>
   <head>
      <title>Bootstrap Example</title>
      <link rel = "stylesheet"
         href = "https://maxcdn.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://maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
   </head>
   <body>
      <p>The following are FMCG companies:</p>
      <div class = "btn-group-justified btn-group-sm btn-group-vertical">
         <button type = "button" class = "btn btn-primary">ITC Limited</button>
         <button type = "button" class = "btn btn-primary">Colgate-Palmolive</button>
         <button type = "button" class = "btn btn-primary">Nestle</button>
         <button type = "button" class = "btn btn-link">Britannia Industries Limited</button>
      </div>
   </body>
</html>

更新於: 2020 年 6 月 12 日

5K+ 瀏覽

開啟職業生涯

完成相關課程並獲得認證

立即開始
廣告
© . All rights reserved.