Skip to content

On certain websites, such as personal websites, we see horizontal scrolling has a simple formula that is implemented with JS. I hope you like it.

License

Notifications You must be signed in to change notification settings

khadem-mh/scrollHorizontal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hi 👋 I'm an expert on React Js 👨‍💻 Next JS

Descripton Mini-Project

  • On certain websites, such as personal websites, we see horizontal scrolling has a simple formula that is implemented with JS. I hope you like it.

Languages

Formula Scroll Horizontal

let customScroll = document.getElementById('scroll')

window.addEventListener('scroll', function () {

    let scrollPercent = window.scrollY / (document.body.clientHeight - window.innerHeight)

    let scrollPercentRoundede = Math.round(scrollPercent * 100)

    customScroll.style.width = scrollPercentRoundede + '%'

})

check this URL for visit this page


Social Network

About

On certain websites, such as personal websites, we see horizontal scrolling has a simple formula that is implemented with JS. I hope you like it.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published