連結 Bootstrap 列表組專案


使用錨標記,而不是列表項,並使用 list-group-item 類連結列表組 -

可以嘗試執行以下程式碼連結 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>
      <a href = "#" class = "list-group-item active">
         Web Dev
      </a>
      <a href = "#" class = "list-group-item">PHP</a>
      <a href = "#" class = "list-group-item">HTML5</a>
      <a href = "#" class = "list-group-item">Java</a>
   </body>
</html>

更新日期: 12-6 月 -2020

410 檢視

開啟您的 事業

完成課程即可獲得認證

開始
廣告