mirror of
https://github.com/Fluffy-Bean/Fluffys-website.git
synced 2025-05-24 12:24:56 +00:00
:3
This commit is contained in:
parent
43665fb930
commit
384aa2b152
173 changed files with 10 additions and 30637 deletions
11
static/js/scroll.js
Normal file
11
static/js/scroll.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
const scroll = document.querySelector('.scroll');
|
||||
|
||||
function setScroll() {
|
||||
let scrollPercentage = (window.scrollY / (document.body.scrollHeight - window.innerHeight)) * 100;
|
||||
scroll.style.width = scrollPercentage + '%';
|
||||
}
|
||||
|
||||
if (scroll) {
|
||||
setScroll();
|
||||
window.onscroll = () => { setScroll(); };
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue