要将列表组包括在Bootstrap面板中,请通过将类.panel添加到<div>元素来创建面板。
另外,将.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">Tutorials</div> <div class = "panel-body"> <p>List of tutorials</p> </div> <ul class = "list-group"> <li class = "list-group-item">C</li> <li class = "list-group-item">Java</li> <li class = "list-group-item">Ruby</li> <li class = "list-group-item">C++</li> </ul> </div> </body> </html>