当前位置: 动力学知识库 > 问答 > 编程问答 >

css - How can I combine navbar and pagination?

问题描述:

I want to go to a new tab when I click on each item of the navbar however I am using pagination (not sure if I am using it correctly) and it guides me to the expected page section but in the same page not in a new tab. How can I fix this?

<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>

网友答案:

Adding target="_blank" could help, for example:

<a class="nav-item nav-link page-item" href="#education" target="_blank">Education</a>
分享给朋友:
您可能感兴趣的文章:
随机阅读: