Bootstrap 可折叠面板
若要在 Bootstrap 中创建一个可折叠面板,请使用 panel-collapse 类。
你可以尝试运行以下代码来创建一个可折叠面板
实例
<!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>Tutorials</h2> <p>Click below...</p> <div class = "panel-group"> <div class = "panel panel-default"> <div class = "panel-heading"> <h4 class = "panel-title"> <a data-toggle = "collapse" href = "#test">Free learning content</a> </h4> </div> <div id = "test" class = "panel-collapse collapse"> <div class = "panel-body">We provide free learning content and quizzes as well.</div> <div class = "panel-footer">Copyright 2018</div> </div> </div> </div> </div> </body> </html>
广告