From 64d368fb22751ed6ae148c5fe25012010e0302e5 Mon Sep 17 00:00:00 2001 From: mumuy Date: Fri, 25 Jul 2025 16:47:24 +0800 Subject: [PATCH] =?UTF-8?q?updated=20=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 22 +++++++++++----------- static/style/index.css | 15 +-------------- 2 files changed, 12 insertions(+), 25 deletions(-) diff --git a/index.html b/index.html index f285a2e..d4d754e 100644 --- a/index.html +++ b/index.html @@ -147,7 +147,7 @@
- +
@@ -322,19 +322,19 @@ })(); // 底部滚动 - (function () { + (function(){ let timer = null; - let $gotop = document.querySelector('.mod-fixedbar a'); - $gotop.addEventListener('click', function () { + let $gotop = document.querySelector('.mod-fixedbar .gotop'); + $gotop.addEventListener('click',function(){ cancelAnimationFrame(timer); - let scrollTop = document.body.scrollTop || document.documentElement.scrollTop; - let move = scrollTop / 18; - timer = requestAnimationFrame(function fn() { - var oTop = document.body.scrollTop || document.documentElement.scrollTop; - if (oTop > 0) { - document.body.scrollTop = document.documentElement.scrollTop = oTop - move; + let scrollTop = document.documentElement.scrollTop; + let move = scrollTop/18; + timer = requestAnimationFrame(function fn(){ + var oTop = document.documentElement.scrollTop; + if(oTop > 0){ + document.documentElement.scrollTop = oTop - move; timer = requestAnimationFrame(fn); - } else { + }else{ cancelAnimationFrame(timer); } }); diff --git a/static/style/index.css b/static/style/index.css index 944fde2..2e4edf6 100644 --- a/static/style/index.css +++ b/static/style/index.css @@ -500,7 +500,6 @@ a:hover{ line-height: 30px; } - .mod-fixedbar .bd { position: fixed; right: 20px; @@ -514,25 +513,13 @@ a:hover{ height: 48px; margin-bottom: 2px; background: rgba(255,255,255,0.8); - border: 1px solid #f0f0f0; + box-shadow: 1px 1px 6px rgba(0,0,0,0.1); line-height: 48px; text-align: center; } -.mod-fixedbar .bd .popup{ - display: none; - position: absolute; - right: 50px; - bottom: 0; - z-index: 99; - border: 1px solid #f0f0f0; - box-shadow: 0 0 2px 0 rgba(0,0,0,0.05); -} .mod-fixedbar .bd a:hover{ background: rgba(255,255,255,0.9); } -.mod-fixedbar .bd a:hover .popup{ - display: block; -} @media screen and (max-width: 1020px) { .header{