According to the twitter bootstrap documentation , I should be able to "Wrap strings of text in a <p>
tag for proper leading and color." When I do this, at any level under navbar
it simply doesn't inherit any of the navbar
classes. Wrapping the string in <a>
tags renders it but it shouldn't be an anchor.
The string I'm trying to render is "Logged in as ... "
.
您必须在导航栏中包含一个类以及p
标签,如下所示:
<p class="navbar-text">Logged in as</p>
这已在issue 2799中修复。
我必须添加<span class="navbar-text">
以使格式与锚标记保持一致。
None of these answers or comments worked for me (latest one was 6+ years old), but what worked for me was the following:
<span>
tag, not <p>
"nav-item"
class on my list element itselfMy final working code looks like this:
<li class="nav-item"><span class="navbar-text"><h5>{{first_name}}</h5></span></li>
Take my word for it, but the word "Sally" below does not change to hyperlink when hovered.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.