Bootstrap .nav-justified 类
在屏幕宽度大于 768px 时,使用类 .nav-justified 与 .nav、.nav-tabs 或 .nav、.nav-pills 使选项卡或胶囊与它们的父级宽度相等。在较小的屏幕上,导航链接会叠加显示。
示例
<!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 style = "background: #FADBD8;"> <h2>Subjects</h2> <ul class = "nav nav-tabs nav-justified"> <li class = "active"><a href = "#">Home</a></li> <li><a href = "#">Team</a></li> <li><a href = "#">Authors</a></li> <li><a href = "#">MVPs</a></li> </ul> </body> </html>
广告