🚀 Socket Launch Week 🚀 Day 5: Introducing Socket Fix.Learn More
Socket
Sign inDemoInstall
Socket

paralless

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

paralless

Simple Parallax powered by CSS3 Transitions

0.1.0
Source
npm
Version published
Maintainers
1
Created
Source

Paralless.js npm

Simple Parallax powered by CSS3 Transitions

npm

Install Paralless, and add it to your package.json dependencies.

$ npm i paralless --save

Vanilla JS Parallax

Optional Reading that explains the technique.

import { Paralless } from 'parallless'

Current implementation is on the DOM, this may change to being JS focused (in the optional reading above it's JS based), but for now set up the elements you want on the page as follows:

Usage

<div class="bradpitt" data-speed="4">
  <img src="http://placehold.it/350x150">
</div>
<div class="bradpitt" data-speed="10">
  <img src="http://placehold.it/350x150">
</div>
let Paralless = swimming('.bradpitt');
Paralless.init();

optional recommended css:

transition: all 0.25s ease-out;
transition-delay: 0s;

Feel free to grab the source and configure for your own needs, I've used this for vertical/side-to-side/rotating elements on various sites. This is the slim version I may extend it to handle more situations. The css positioning of elements initially has a large impact as well.

MIT License

Keywords

javascript

FAQs

Package last updated on 24 Sep 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts