Parallax Design

Tips & Considerations


Google Maps Vector

What is Parallax Design?

Parallax design is a technique where background and foreground images move at different speeds, giving an illusion of depth and creating a 3D effect as you scroll. In most cases, the parallax scrolling effect is added to background images and videos. It can be vertical or horizontal, although vertical scrolling is most common.

This technique has been around for quite some time in the Web design community before its recent rise to a trending style. When used sparingly, it can provide a nice, subtle element of depth that enhances user engagement.

Why Should I Use It?

Parallax scrolling effects are slowly being implemented on many sites across the Web. Since it's still not a standard technique, you increase your chance to achieve a "wow" effect. Because different layers of a website move at different speeds, people get immersed into a more engaging and vibrant user experience.

It also creates harmony with other design elements within a Web page. For example, one of the most popular contemporary trends is long-scrolling web pages. In an environment where a user scrolls rather than clicks, the parallax scrolling technique creates the desired illusion of depth. By integrating this effect in the backgrounds, you grow the chances of keeping the audience more interested, thus increasing visit times.

Parallax Scrolling Design Tips

Things to consider when implementing parallax scrolling into your design:

  1. Make sure that all elements of your site's design can adjust to all screen sizes and resolutions. It's not a secret that the Web has gone responsive. In order for your site to captivate a wider range of users, make sure that it runs on desktop and mobile devices equally well. Also, the parallax scrolling tricks should work flawlessly.
  2. Make the technique serve its purpose. Enhancing the pages of your site just for the sake of the 3D illusion is not a good idea. Make it interactive, but still effective. For example, you can use the parallax scroll to reveal the latest collection of an outfit on one model as a user scrolls down the page.
  3. Parallax scroll should tell a story. As you add the technique to the page, take the user through a journey in digital space.
  4. Do not forget to use CTAs. As a user scrolls through a page, he expects something to happen or to find a route to get somewhere else. This is when CTAs become a perfect means of establishing user communication. Make CTAs bold and outstanding.
  5. Do not overdo the technique. Make sure that your web page will perform equally well in all Web environments. Make it fast-loading on all devices and browsers.
  6. Since parallax scrolling websites make heavy use of images, do not forget to employ pre-loading images and assets so that it doesn't take too long to load every single piece of data.

Demo:  Parallax Scrolling Christmas Card

Today we'd like to share a fun parallax scrolling Christmas card, a demo of this tutorial. It is built with CSS and skrollr.js, a stand-alone Javascript parallax scrolling library. A few highlights of the tutorial are outlined below.

Using skrollr.js

Skrollr.js allows you to animate the CSS properties of an element depending on the horizontal scrollbar position. It is implemented with the use of HTML5 “data-” attributes, so you can easily add scrolling effects to your site without even touching the Javascript!

The Images

7 images were used: three background images, two repetitive patterns (red diagonal stripes, snowflakes), a transparent PNG (blue snowflakes), and an SVG containing two paths (left and right parts) of a simple ribbon bow.

Demo Vector Images

Methods

The parallax effect was implemented by Repeat Pattern, where scrolling displays over a repeated background, and by Raster Parallax, which is used to give an optical illusion of movement.

What about mobile?

Because position:fixed does not work well on many mobile devices, we have provided an alternative solution for mobile phones. A script was added to detect mobile browsers (767px and smaller) and redirect their users to the mobile version of the page. For the purpose of this tutorial, the mobile page is only a basic static HTML page. It works great on tablets, though. Check it out!

The Final Result

A link to the scrolling Christmas card demo is provided below. Take a look at the source code and adapt it for your own project!

View Demo Website

Wrapping Up

When used properly, the parallax scrolling effect can significantly enhance the visual appeal of a website and engage the user with a captive storytelling experience. Use the parallax effect to your benefit (and avoid the most widespread mistakes) to achieve a "wow" effect on your site.

We hope you have enjoyed this tutorial and have learned a few interesting things in the process! Until next time, happy coding!

Dog Icon

Project Documentation

Projects

Want to Learn more?

Subscribe to Trends.

Scroll To Top Arrow Icon