Skip to content

FocusCookie/opacity-scroller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Opacity Scroller πŸ‘‡πŸ‘€

Add the following code to your HTML. And each text item will be highlighted individually while scrolling down the page.

<div class="os__wrapper">
    <div class="os__text-container">
    <span class="os__text-item">πŸ‘¨β€πŸš€</span>
    <span class="os__text-item">🦫</span>
    <span class="os__text-item">πŸ•΅οΈβ€β™‚οΈ</span>
    <span class="os__text-item">πŸ‘€</span>
    </div>
</div>

The JS script will add ghost blocks to the os_wrapper. A ghost and a text-item are linked via a unique uuid. If the ghost scrolls through the text-container the linked text-item is highlighted (opacity = 1).

The solution works also with multiple os_wrappers.

You can define the ghost block heights in the CSS file.

About

A vanilla JS based scroller box which highlights the given p items in the opacity scroller while scrolling.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors