A Simple Parallax Scrolling Technique
Parallax scrolling is an interesting technique, where, as you scroll, the background images translate slower than the content in the foreground, creating the illusion of 3D depth. As I planned to re-design my personal website, my first goal was to write the shortest and simplest code to achieve maximum awesomeness! I'll show you how I did it. In this tutorial, I'll teach you the simplest parallax scrolling technique you've ever came across, so let's dig in! This technique revolves around controlling the speed of background image. So let's begin with the HTML markup, creating two sections along with the required attributes: "data-type" and "data-speed". I am using the <section> tag with the attributes data-type & data-speed, which were introduced in HTML5. According to the specification for Custom Data Attributes, any attribute that starts with data- will be treated as a storage area for private data. I know what you're thinking: you're worried about IE. Now it should look like this...
Related: COdrops Tutorials
• Parallax rolling
• Web design / dev