gpt4 book ai didi

css - 如何结合导航栏和分页?

转载 作者:太空宇宙 更新时间:2023-11-04 10:08:51 25 4
gpt4 key购买 nike

当我点击导航栏的每个元素时我想转到一个新选项卡但是我正在使用分页(不确定我是否正确使用它)并且它 Bootstrap 我到预期的页面部分但在同一页面中不在新标签页中。我该如何解决这个问题?

<div class="container">
<nav class="navbar navbar-dark bg-primary navbar-fixed-top pagination pagination-sm">
<div class="nav navbar-nav">
<a class="nav-item nav-link active page-item" href="#monajalal">Mona Jalal <span class="sr-only">(current)</span></a>
<a class="nav-item nav-link page-item" href="#education">Education</a>
<a class="nav-item nav-link page-item" href="#experience">Experience</a>
<a class="nav-item nav-link page-item" href="#courseworks">Courseworks</a>
<a class="nav-item nav-link page-item" href="#teaching">Teaching</a>
<a class="nav-item nav-link page-item" href="#projects">Projects</a>
<a class="navbar-brand pull-sm-right m-r-0" href="https://github.com/monajalal"><i class="fa fa-github fa-lg"></i></a>
<a class="navbar-brand pull-sm-right m-r-2" href="https://twitter.com/MonaJalal_"><i class="fa fa-twitter fa-lg"></i></a>
<a class="navbar-brand pull-sm-right m-r-4" href="https://www.linkedin.com/in/mona-jalal"><i class="fa fa-linkedin fa-lg"></i></a>
<a class="navbar-brand pull-sm-right m-r-6" href="http://stackoverflow.com/users/2414957/mona-jalal"><i class="fa fa-stack-overflow fa-lg"></i></a>

</div>
</nav>
</div>

最佳答案

添加 target="_blank"可能会有所帮助,例如:

<a class="nav-item nav-link page-item" href="#education" target="_blank">Education</a>

关于css - 如何结合导航栏和分页?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37758099/

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