An open API service indexing awesome lists of open source software.

https://github.com/dinhlongviolin1/appear-on-scroll-library

Simple appear on scroll CSS-based library
https://github.com/dinhlongviolin1/appear-on-scroll-library

appear appear-event appear-on-scroll library reveal-on-scroll scroll

Last synced: 5 months ago
JSON representation

Simple appear on scroll CSS-based library

Awesome Lists containing this project

README

          

# 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.