简体   繁体   中英

how can I make this (sticky, full-width) navbar using Bootstrap?

I have spent literally hours (I'm new to coding) trying to replicate this navbar ( https://bootstrapmade.com/demo/MyResume/ ) but couldn't do it. I'm not sure if it requires JavaScript knowledge (I only know HTML, CSS, and Bootstrap). Any help how to do it?

It's called "ScrollSpy". You can find it in the documentation here .

<body data-spy="scroll" data-target="#navbar-example">
  ...
  <div id="navbar-example">
    <ul class="nav nav-tabs" role="tablist">
      ...
    </ul>
  </div>
  ...
</body>
$('body').scrollspy({ target: '#navbar-example' })

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM