Home › Updates

Updates

Easy to create parallax effect

 May 12, 2017
by Flavio Mester

Parallax scrolling is a web site trend where the background image stays in place while the foreground content “glides” above it as you scroll. Here is an example from the current version of our public website:

Parallax - before

After you scroll down a bit, the text will have moved up, but the background image stays in place, creating an illusion of depth:

Parallax - after

How do to that in YWD

We have implemented a new stylesheet class specifically for that. It may sound complicated, but it isn’t: all you need to do is type the word parallax in the Advanced options of the content block where you have the background image:

Parallax class

Which dimensions to use?

It depends. Because the parallax image is responsive, it should be big enough to cover a typical laptop screen and with a similar resolution so it doesn’t look too “stretched”. In our case we used an image that is 1440x776 but you will probably need to go through some tryal & error before you get the best results. If you make it too big it’ll slow down the page download (and SEO) and may even not look good, because the centre of the image may fall in an odd place within your specific page layout.

As always, make sure you optimize your image. Export pho for the Web. Export photos e.g. landscapes as .jpg, and line art like the one in our example as a .png

Parallax image

How about mobile?

Because of performance issues, mobile support for parallax is either very limited or nonexistent. So the effect will only be visible on computers and tablets.


Flavio Mester

Flavio Mester is a graphic designer as well as a systems analyst (in a distant life he was an architect). A founding partner of Your Web Department, he's responsible for the design and development of all the YWD website management platform interfaces.
Google+ | Twitter | LinkedIn

 


  

 

 
Top of page