Update index.js
This commit is contained in:
parent
a4699825ca
commit
e5a3435926
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user