DEV Community

Faisal Ahmed
Faisal Ahmed

Posted on

1

scroll animation content in the website from left/top/right/bottom

website: https://scrollrevealjs.org/

  • add this link in the html page:
    <script src="https://unpkg.com/scrollreveal"></script>

  • add this code in the js file(just change the classname):
    syntax: sr.reveal('.classname',{ delay: 200, origin: 'top' })


// scrollreveal 
const sr = ScrollReveal({
    distance: '60px',
    duration: 2500,
    delay: 400,
    reset: true
})

sr.reveal('.text',{ delay: 200, origin: 'top' })
sr.reveal('.form-container form', { delay: 800, origin: 'left' })
sr.reveal('.heading', { delay: 800, origin: 'top' })
sr.reveal('.ride-container .box', { delay: 600, origin: 'top' })
sr.reveal('.services-container .box', { delay: 600, origin: 'top' })
sr.reveal('.reviews-container .single-review', { delay: 600, origin: 'top' })
sr.reveal('.newsLetter-container', { delay: 600, origin: 'right' })
sr.reveal('.copyright-icons .bx', { delay: 800, origin: 'left' })
Enter fullscreen mode Exit fullscreen mode

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay