Skip to content

Micro-learnings/Parallax-web-effects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Parallax-web-effects

Parallax effects made with vanilla JS + VivusSVG plugin

FYI

  • data-attributes can store any information on the DOM, retrieving their values with the .dataset JS property.
  • .getBoundingClientRect() method with its porperty .top returns the difference between the element top and the viewport top.
  • ìsInViewport() function checks whether the argumented element is inside the viewport.
  • Vivus SVG accepts a second optional argument: a callback that will trigger after the drawing process finishes (plugin docs)
  • Smooth transition effect made by the final CSS rule (yay!):
.parallax {
   transition: transform 10s cubic-bezier(0,1,.5,1)
}

External resources

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors