带列表组的 Bootstrap 面板
在任何面板中包含列表组。通过向 <div> 元素添加类 .panel 来创建面板。此外,向该元素添加类 .panel-default。现在,在该面板中,包含列表组。
可以尝试运行以下代码,以设置带列表组的面板 −
示例
<!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 = "panel panel-default"> <div class = "panel-heading">Panel heading</div> <div class = "panel-body"> <p>The following is a list of topics in Java.</p> </div> <ul class = "list-group"> <li class = "list-group-item">Java Interfaces</li> <li class = "list-group-item">Java Packages</li> <li class = "list-group-item">File Handling in Java</li> </ul> </div> </body> </html>
广告