javascript moving text from left to right onscroll

Solutions on MaxInterview for javascript moving text from left to right onscroll by the best coders in the world

showing results for - "javascript moving text from left to right onscroll"
Étienne
06 Mar 2018
1var text = document.querySelector("h1");
2document.addEventListener("scroll", () => {
3  text.style.left = window.scrollY * 5 + "px";
4});