Line 81: | Line 81: | ||
.header-nav { | .header-nav { | ||
position: fixed; | position: fixed; | ||
− | top: | + | top: 16px; |
left: 0; | left: 0; | ||
width: 100%; | width: 100%; | ||
Line 147: | Line 147: | ||
} | } | ||
</style> | </style> | ||
− | |||
Line 207: | Line 206: | ||
</div> | </div> | ||
<!-- Navbar_down --> | <!-- Navbar_down --> | ||
+ | |||
<script type="text/javascript"> | <script type="text/javascript"> | ||
Line 226: | Line 226: | ||
$("#nav1_1").hover(function(){ | $("#nav1_1").hover(function(){ | ||
$("#sub1").show(); | $("#sub1").show(); | ||
− | $("#sub1").attr("style","left:" + document.getElementById("nav1_1").getBoundingClientRect().left+"px;top:"+(document.getElementById("nav1_1").getBoundingClientRect().top+ | + | $("#sub1").attr("style","left:" + document.getElementById("nav1_1").getBoundingClientRect().left+"px;top:"+(document.getElementById("nav1_1").getBoundingClientRect().top+6)+"px"); |
},function(){ | },function(){ | ||
$("#sub1").hide(); | $("#sub1").hide(); | ||
Line 232: | Line 232: | ||
$("#nav1_2").hover(function(){ | $("#nav1_2").hover(function(){ | ||
$("#sub2").show(); | $("#sub2").show(); | ||
− | $("#sub2").attr("style","left:" + document.getElementById("nav1_2").getBoundingClientRect().left+"px;top:"+(document.getElementById("nav1_1").getBoundingClientRect().top+ | + | $("#sub2").attr("style","left:" + document.getElementById("nav1_2").getBoundingClientRect().left+"px;top:"+(document.getElementById("nav1_1").getBoundingClientRect().top+6)+"px"); |
},function(){ | },function(){ | ||
$("#sub2").hide(); | $("#sub2").hide(); | ||
Line 238: | Line 238: | ||
$("#nav1_3").hover(function(){ | $("#nav1_3").hover(function(){ | ||
$("#sub3").show(); | $("#sub3").show(); | ||
− | $("#sub3").attr("style","left:" + document.getElementById("nav1_3").getBoundingClientRect().left+"px;top:"+(document.getElementById("nav1_1").getBoundingClientRect().top+ | + | $("#sub3").attr("style","left:" + document.getElementById("nav1_3").getBoundingClientRect().left+"px;top:"+(document.getElementById("nav1_1").getBoundingClientRect().top+6)+"px"); |
},function(){ | },function(){ | ||
$("#sub3").hide(); | $("#sub3").hide(); | ||
Line 244: | Line 244: | ||
$("#nav1_4").hover(function(){ | $("#nav1_4").hover(function(){ | ||
$("#sub4").show(); | $("#sub4").show(); | ||
− | $("#sub4").attr("style","left:" + document.getElementById("nav1_4").getBoundingClientRect().left+"px;top:"+(document.getElementById("nav1_1").getBoundingClientRect().top+ | + | $("#sub4").attr("style","left:" + document.getElementById("nav1_4").getBoundingClientRect().left+"px;top:"+(document.getElementById("nav1_1").getBoundingClientRect().top+6)+"px"); |
},function(){ | },function(){ | ||
$("#sub4").hide(); | $("#sub4").hide(); | ||
Line 251: | Line 251: | ||
$("#nav1").hover(function(){ | $("#nav1").hover(function(){ | ||
$("#sub1").show(); | $("#sub1").show(); | ||
− | $("#sub1").attr("style","left:" + document.getElementById("nav1").getBoundingClientRect().left+"px;top:"+(document.getElementById("nav1").getBoundingClientRect().top | + | $("#sub1").attr("style","left:" + document.getElementById("nav1").getBoundingClientRect().left+"px;top:"+(document.getElementById("nav1").getBoundingClientRect().top-5+document.documentElement.scrollTop)+"px"); |
},function(){ | },function(){ | ||
$("#sub1").hide(); | $("#sub1").hide(); | ||
Line 262: | Line 262: | ||
$("#nav2").hover(function(){ | $("#nav2").hover(function(){ | ||
$("#sub2").show(); | $("#sub2").show(); | ||
− | $("#sub2").attr("style","left:" + document.getElementById("nav2").getBoundingClientRect().left+"px;top:"+(document.getElementById("nav2").getBoundingClientRect().top | + | $("#sub2").attr("style","left:" + document.getElementById("nav2").getBoundingClientRect().left+"px;top:"+(document.getElementById("nav2").getBoundingClientRect().top-5+document.documentElement.scrollTop)+"px"); |
},function(){ | },function(){ | ||
$("#sub2").hide(); | $("#sub2").hide(); | ||
Line 273: | Line 273: | ||
$("#nav3").hover(function(){ | $("#nav3").hover(function(){ | ||
$("#sub3").show(); | $("#sub3").show(); | ||
− | $("#sub3").attr("style","left:" + document.getElementById("nav3").getBoundingClientRect().left+"px;top:"+(document.getElementById("nav3").getBoundingClientRect().top | + | $("#sub3").attr("style","left:" + document.getElementById("nav3").getBoundingClientRect().left+"px;top:"+(document.getElementById("nav3").getBoundingClientRect().top-5+document.documentElement.scrollTop)+"px"); |
},function(){ | },function(){ | ||
$("#sub3").hide(); | $("#sub3").hide(); | ||
Line 284: | Line 284: | ||
$("#nav4").hover(function(){ | $("#nav4").hover(function(){ | ||
$("#sub4").show(); | $("#sub4").show(); | ||
− | $("#sub4").attr("style","left:" + document.getElementById("nav4").getBoundingClientRect().left+"px;top:"+(document.getElementById("nav4").getBoundingClientRect().top | + | $("#sub4").attr("style","left:" + document.getElementById("nav4").getBoundingClientRect().left+"px;top:"+(document.getElementById("nav4").getBoundingClientRect().top-5+document.documentElement.scrollTop)+"px"); |
},function(){ | },function(){ | ||
$("#sub4").hide(); | $("#sub4").hide(); | ||
Line 294: | Line 294: | ||
}); | }); | ||
</script> | </script> | ||
+ | |||
+ | |||
Revision as of 08:57, 12 October 2018