Skip to content

Pure JavaScript library to indicate overflowing content by displaying a shadow on the content edge

License

Notifications You must be signed in to change notification settings

tapiocode/overflow-shadow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

overflow-shadow

Having long content overflowing a container on a web page can become a problem, especially when the user's environment does not show a scrollbar. overflow-shadow solves this by showing a shadow gradient along the edge of the container that is overflowing. The implementation is in pure JavaScript and is simple to use.

In the picture the linear gradient shadows can be seen on top and bottom of the content box:

Usage

Add an attribute overflow-shadow to the appropriate containers on the page and make sure the script overflow-shadow.js is executed.

<div overflow-shadow>
  /* Long content */
</div>

The script appends the CSS styles and the necessary DOM elements automatically. Currently, there are no settings or customizations available.

Demo

Links to pages with examples.

License

MIT License

About

Pure JavaScript library to indicate overflowing content by displaying a shadow on the content edge

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published