使用list-group-item类将项目添加到列表组中的每个<li>元素。
您可以尝试运行以下代码来实现list-group-item类
<!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> <h2>Tools</h2> <p>The following are the tools:</p> <ul class = "list-group"> <li class = "list-group-item">Online Compiler</li> <li class = "list-group-item">Image Editor</li> <li class = "list-group-item">Image Optimizer</li> <li class = "list-group-item">Whiteboard</li> </ul> </body> </html>