To emulate this same effect you can use cssGen.js. It's a small script that will compute the necessary CSS code for a given DOM structure and input parameters.
Visit CSS MouseOver Parallax for a live example.
- PHP ( //php.net )
- Compass ( //compass-style.org )
- Node.js ( //nodejs.org )
After the listed dependencies are installed, you can install the npm ones by running:
Now you should have:
- Grunt ( //gruntjs.com/getting-started )
- Bower ( //bower.io/ )
To install all the project dependencies run:
To compile the css run:
If the basic dependencies are met, simply run
grunt and it should start the build process, compiling the css, generating sprites and installing npm and bower dependencies automatically.
The original code will be visible at '/dev' and the built version under '/'. Note that the built version is not part of the repository.