預設情況下在 Bootstrap 中顯示可摺疊內容


在 Bootstrap 中使用 collapse in 中的 class 可預設顯示可摺疊的內容 −

示例

線上演示

<!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>More Quizzes</h2>
         <a href = "#test" class = "btn btn-info" data-toggle = "collapse">More</a>
         <div id = "test" class = "collapse in">
            We have quizzes on Java, PHP, Ruby, C, C++, etc. as well.
         </div>
      </div>
   </body>
</html>

更新時間: 12-Jun-2020

232 次瀏覽

開啟您的 事業

完成課程來獲得認證

開始
廣告
© . All rights reserved.