所以我想出了如何修复它等等:
HTML:
<div id="header_nav">
<nav>
<ul class="navi">
<li><a href="">Home</a></li>
... Stack overflow wont let me add more code, but there are more links, etc
JS:
var elementPosition = $('#header_nav').offset();
$(window).scroll(function() {
if ($(window).scrollTop() > elementPosition.top) {
$('#header_nav').css('position', 'fixed').css('top', '0');
} else {
$('#header_nav').css('position','static');
}
});
当您将鼠标悬停在每个选项上时,我的导航栏应该具有悬停效果。悬停效果仅在完成向顶部固定的过渡后才起作用。链接也不可点击。我试过玩JS,但我无法弄明白。就像条形图只保存为图像一样,直到你完全向下滚动。
完整代码在此处:http://liveweave.com/XGPWVt
答案 0 :(得分:0)
将SELECT . . .
FROM (VicDescriptions INNER JOIN
VacValues
ON VicDescriptions.Vic_Make = VacValues.Vic_Make AND
VicDescriptions.Vic_Year = VacValues.Vic_Year
) INNER JOIN
VacDescriptions
ON VacDescriptions.Period = VacValues.Period AND
VacDescriptions.VAC = VacValues.VAC
部分移到<div id="wrapper">
标记内。
答案 1 :(得分:0)
如果您将static更改为relative也适用