🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

Slock is a really simple jQuery plugin that uses CSS transform and background-position-y properties to create a subtle parallax scrolling effect on your background images.

parallax scrolling

Documentation

slock

Very Lightweight jQuery Parallax plugin

Getting started

Javascript (requires JQuery)

 jQuery(".slock").slock({ 	speed: 0.2  }); 

HTML

 <div class="slock" style="background-image: url(#);"> </div>	 

CSS

 .slock { 	height:     		500px; 	background-position: 	0 0; 	background-repeat: 	no-repeat; 	background-size: 	cover; 	transform: 		translateX(0); 	will-change: 		background-position-y; }	 

You May Also Like