我有以下的div结构
<div class="page">
<div id="top" class="header-container">
<!-- navigation menu and search box in here -->
</div>
<div class="main-container col1-layout">
<!-- Fancybox for photo gallery and
我正在开发的网站:
当我滚动页面时,滚动得太远了。如前所述,导航栏覆盖了页面的前50 of。我怎么才能解决这个问题?我试着在滚动的js中添加-50,但这会破坏导航条。在导航栏中,会选择错误的部分。
对于移动版本,当我在导航菜单上选择一个选项时,它不会自动收回。你得自己把它弄垮。
滚动js:
//jQuery to collapse the navbar on scroll
$(window).scroll(function() {
if ($(".navbar").offset().top > 50) {
$(".navbar-fixed-