Skip to content

dinhlongviolin1/appear-on-scroll-library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

appear-on-scroll-library

Simple appear on scroll CSS-based library

What is this?

Simple Appear/Reveal on scroll library by changing element opacity. JS toggle classes on element depending on current scroll position.

How to use this library?

  • Add aos.css and aos.js into your html file.
  • Add class appear-on-scroll to your desired element.

Customizing this library

There are two attributes that can be modified in the js file: repeat and elementOffset.

  • repeat: the default value is true. By changing this attribute to false, the appear animation will happen only once when the element is in scroll view.
  • elementOffset: the amount of offset from the bottom of the screen to the top position of the element when it appears. The default value is vh / 6.

An example file has been inluded.