在Bootstrap中使用.list-group类创建带边框的列表组。
您可以尝试运行以下代码来实现.list-group类-
<!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"> <h3>Countries</h3> <ul class = "list-group"> <li class = "list-group-item">US</li> <li class = "list-group-item">India</li> <li class = "list-group-item">Netherlands</li> <li class = "list-group-item">Germany</li> </ul> </div> </body> </html>