链接 Bootstrap 列表组项目
使用锚标记,而不是列表项,并使用 list-group-item 类链接列表组 -
可以尝试运行以下代码链接 Bootstrap 列表组项目 -
示例
<!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> <a href = "#" class = "list-group-item active"> Web Dev </a> <a href = "#" class = "list-group-item">PHP</a> <a href = "#" class = "list-group-item">HTML5</a> <a href = "#" class = "list-group-item">Java</a> </body> </html>
广告