在 Bootstrap Navbar 中包装文本字符串
bootstraphtmljqueryjavascript更新于 2026/2/11 9:16:17
使用 .navbar-text 类在元素中包装文本字符串。
示例
您可以尝试运行以下代码来设置 Bootstrap Navbar 中的文本 −
<!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"> <div class = "navbar-header"> <a class = "navbar-brand" href = "#">Demo</a> </div> <div> <p class = "navbar-text">Copyright © 2018</p> </div> </nav> </body> </html>
相关文章
有用资源
html 参考教程 - 该教程包含有关 html 的更多信息:https://www.cainiaomax.com/html/

