Bootstrap 中的非导航(标准)链接
使用不在常规导航栏导航组件中的标准链接,然后使用类名 navbar-link 为默认和反向导航栏选项添加合适的颜色。
你可以尝试运行以下代码来设置标准链接 −
示例
<!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> <nav class = "navbar navbar-default" role = "navigation" style = "background: green;"> <nav class = "navbar navbar-default" role = "navigation"> <div class = "navbar-header"> <a class = "navbar-brand" href = "#">Website</a> </div> <div> <p class = "navbar-text navbar-right"> Copyright <a href = "#" class = "navbar-link">TP</a> </p> </div> </nav> </body> </html>
广告