导航浮动

master
15008401624 2021-01-29 11:43:10 +08:00
parent 5d1ad23b45
commit dcd627783f
2 changed files with 6 additions and 6 deletions

View File

@ -101,7 +101,7 @@ input,select,textarea{outline:medium none; resize: none;}
.head-box .center-block .language a.active{ font-weight: bold; color: #F9BE3E;}
.head-box .center-block .language a:hover{ color: #F9BE3E;}
.head-box.active{ position: fixed; top: 0;}
.head-box.active .w-1500{ width: 100%;}
/* .head-box.active .w-1500{ width: 100%;} */
.banner-box{ height: 100vh;}

View File

@ -10,11 +10,11 @@ layui.use(['layer', 'form', 'element'], function(){
});
$(window).scroll(function(event) {
// if ($(window).scrollTop() > 0) {
// $('.head-box').addClass('active');
// } else {
// $('.head-box').removeClass('active');
// }
if ($(window).scrollTop() > 0) {
$('.head-box').addClass('active');
} else {
$('.head-box').removeClass('active');
}
if ($(window).scrollTop() > 400) {
$('.gotop').fadeIn();
} else {