修复进度条

main
AviderMin 4 weeks ago
parent ccee1b3b31
commit ff34368c5c

@ -113,7 +113,7 @@
}); });
Prostick = document.querySelector('.Prostick'); Prostick = document.querySelector('.Prostick');
totalHeight = document.body.scrollHeight - window.innerHeight; totalHeight = document.documentElement.scrollHeight - window.innerHeight;
}); });
window.addEventListener('scroll', function () { window.addEventListener('scroll', function () {

@ -78,7 +78,7 @@
}); });
Prostick = document.querySelector('.Prostick'); Prostick = document.querySelector('.Prostick');
totalHight = document.body.scrollHeight - window.innerHeight; totalHight = document.documentElement.scrollHeight - window.innerHeight;
}); });
window.addEventListener('scroll', function () { window.addEventListener('scroll', function () {

@ -56,7 +56,7 @@
Prostick = document.querySelector('.Prostick'); Prostick = document.querySelector('.Prostick');
totalHight = document.body.scrollHeight - window.innerHeight; totalHight = document.documentElement.scrollHeight - window.innerHeight;
}); });
window.addEventListener('scroll', function () { window.addEventListener('scroll', function () {
let pro = (window.pageYOffset / totalHight) * 100; let pro = (window.pageYOffset / totalHight) * 100;

@ -36,7 +36,7 @@
Prostick = document.querySelector('.Prostick'); Prostick = document.querySelector('.Prostick');
totalHight = document.body.scrollHeight - window.innerHeight; totalHight = document.documentElement.scrollHeight - window.innerHeight;
}); });
window.addEventListener('scroll', function () { window.addEventListener('scroll', function () {
let pro = (window.pageYOffset / totalHight) * 100; let pro = (window.pageYOffset / totalHight) * 100;

Loading…
Cancel
Save