diff --git a/index.html b/index.html index 72d31eb..ad7bf5a 100644 --- a/index.html +++ b/index.html @@ -54,6 +54,15 @@

+
+ +
@@ -145,7 +154,15 @@ const n1 = document.documentElement.scrollTop navbar.style.top = n1 >= news.offsetTop ? 0 : '-65px' }) - + const elevator = document.querySelector('.news-elevator') + window.addEventListener('scroll',function(){ + const n = document.documentElement.scrollTop + if (n >=300){ + elevator.style.opacity = 1 + }else{ + elevator.style.opacity = 0 + } + })