gpt4 book ai didi

html - Bootstrap 导航栏问题,额外空间

转载 作者:行者123 更新时间:2023-11-28 15:14:17 26 4
gpt4 key购买 nike

这是我的网站http://webninjas.eu/ .我的导航栏的问题是当我从页面顶部按“开始”按钮时有额外的空间,或者当网站处于手机分辨率时按导航栏中的任何元素。

Screen-shot of the problem.

我知道问题出在 z-index 但我不知道如何解决。768<分辨率的区别:

element.style {
z-index: 1000;
position: fixed;
top: 0px;
margin-left: 0px;
width: 1035px;
left: 0px;
}

和分辨率<768:

element.style {
z-index: auto;
position: relative;
top: 0px;
}

我尝试为 .main-nav-outer 提供 768 < 分辨率参数,但结果与我需要的还差得远。

最佳答案

因为你给的偏移量是102

 $('html, body').stop().animate({
scrollTop: $($anchor.attr('href')).offset().top - 102
}, 1500, 'easeInOutExpo');

将此更改为 0

关于html - Bootstrap 导航栏问题,额外空间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47630514/

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