使用 Bootstrap 停用分頁連結


使用 .pagination 結合 Bootstrap 中的 .disabled 類以停用分頁連結。

可以透過執行以下程式碼嘗試停用分頁連結

示例

動態示例

<!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>Java Tutorial</h2>
         <p>The following are the lessons of Java Tutorial:</p>
         <ul class = "pagination">
            <li class = "disabled"><a href = "#">1</a></li>
            <li><a href = "#">2</a></li>
            <li><a href = "#">3</a></li>
            <li><a href = "#">4</a></li>
            <li><a href = "#">5</a></li>
            <li><a href = "#">6</a></li>
            <li><a href = "#">7</a></li>
            <li class = "disabled"><a href = "#">8</a></li>
         </ul>
      </div>
   </body>
</html>

更新時間:15-6 月-2020

894 次瀏覽

開啟你的職業生涯

完成課程以獲得認證

開始學習
廣告
© . All rights reserved.