Update index.js

This commit is contained in:
路人甲 2024-08-03 11:01:25 +08:00
parent a4699825ca
commit e5a3435926

View File

@ -1,6 +1,6 @@
// 头部滚动 // 头部滚动
(function(){ (function(){
let $header = document.querySelector('header'); let $header = document.querySelector('.mod-head');
document.querySelector('.scroll-container').addEventListener('scroll',function(){ document.querySelector('.scroll-container').addEventListener('scroll',function(){
let scrollTop = this.scrollTop; let scrollTop = this.scrollTop;
let ratio = Math.min(scrollTop/1000,1); let ratio = Math.min(scrollTop/1000,1);