From 55277215151231e81077ceb87ab28bcc78dc2dcb Mon Sep 17 00:00:00 2001
From: AviderMin
Date: Mon, 21 Oct 2024 11:03:21 +0800
Subject: [PATCH] =?UTF-8?q?=E6=BB=9A=E5=8A=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
index.html | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
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
+ }
+ })