gpt4 book ai didi

css - 我可以在 Bootstrap 菜单中放置两个链接吗

转载 作者:太空宇宙 更新时间:2023-11-03 20:46:20 25 4
gpt4 key购买 nike

我正在为菜单链接使用 bootstrap 2.3

<div class="span3">
<ul class="nav nav-pills nav-stacked">
<li class="active"><a href="/portal/profile">My profile</a></li>
<li><a href="#">Edit</a></li>
<li><a href="#">Photos</a></li>
<li><a href="#">Competitions</a></li>
<li><a href="#">List of profiles</a></li>
</ul>
</div>

是否可以使用如图所示的 Bootstrap 或任何其他方式将两个链接(我的个人资料和编辑)放在一行中。谢谢。

enter image description here

最佳答案

您可以使用第 nth-child 选择器仅使用 CSS 来实现这一点。它仍然有响应。

li:nth-child(1), li:nth-child(2) {
display:inline-block;
}

演示:http://jsfiddle.net/z5pXh/3/

关于css - 我可以在 Bootstrap 菜单中放置两个链接吗,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20693702/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com