我已经为此搜索了整堆,但似乎找不到有效的解决方案。基本上,我的NavBar非常完美。现在,我想在页面向下滚动时缩小NavBar,以使用平滑的过渡效果(动画)使其更苗条。这是我当前NavBar的HTML标记:<header> <nav class="navbar fixed-top navbar-toggleable-md navbar-inverse bg-inverse"> <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <a class="navbar-brand" href="#"><img class="animated bounceIn" src="img/logo-light.png" alt="I Web You – Perth Website Branding"></a> <div class="collapse navbar-collapse" id="navbarSupportedContent"> <ul class="navbar-nav ml-auto"> <li class="nav-item active"> <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a> </li> <li class="nav-item"> <a class="nav-link" href="#">About</a> </li> <li class="nav-item"> <a class="nav-link" href="#">Portfolio</a> </li> <li class="nav-item"> <a class="nav-link" href="#">Contact</a> </li> <li class="nav-item"> <a class="nav-link" href="#">Blog</a> </li> </ul> </div> </nav> </header>有什么想法可以实现这一目标吗?我已经做了很多搜索,但是大多数解决方案都是针对Bootstrap 3的。
3 回答
- 3 回答
- 0 关注
- 1196 浏览
相关问题推荐
添加回答
举报
0/150
提交
取消