在 Bootstrap 导航栏中换行文本
使用类 .navbar-text 在元素中换行文本。
示例
你可以尝试运行以下代码在 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> <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>
广告