[英]How can I align to the end of a bootstrap navbar one of my link
enter image description here在此处输入图像描述
I'm tring to use a bootstrap navbar and I'd like align one Link, the last, to the right.我正在尝试使用引导导航栏,我想将一个链接,最后一个,向右对齐。 I searched on the documentation, but i didn't find any usefull answer.
我搜索了文档,但没有找到任何有用的答案。 Hope you can Help me
希望你能帮我
try adding the property ms-auto, ms-right, or ms-left depending on what side you're trying to align towards.尝试添加属性 ms-auto、ms-right 或 ms-left,具体取决于您尝试对齐的一侧。 here is an example, I was just working on that
这是一个例子,我只是在研究那个
<div class="collapse navbar-collapse" id="navbar">
<ul class="navbar-nav ms-auto">
<li class="nav-item active" aria-current="page">
<a class="nav-link" href="index.html">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="portfolio-overview.html">Portfolio</a>
</li>
</ul>
in my case they align towards the right, but if you change it for ms-right the links will move to the right.在我的情况下,它们向右对齐,但如果您将其更改为 ms-right,链接将向右移动。
hope that works for you!希望对你有用!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.