Replicate the Netflix Screensaver: Multi-Layer Animation

25 Oct, 2018

I love Netflix's new screensaver. If you leave your Netflix on for a bit you'll see it start to advertise shows in a cool multi-layer animation. Here's a quick video of some that popped up on my TV yesterday evening.


Netflix Screensaver


From what I can see there are usually about three layers: a static background layer and two layers in front that slowly move in different directions.

This got me thinking that it's a pretty neat effect to add to your website and relatively easy to do with CSS animation and keyframes and so here's my attempt at replicating it:


See the Pen Netflix Screensaver Inspired Background Image Animation by Stephanie O'Gay Garcia (@stephanieogaygarcia) on CodePen.


I went for a festive theme since I think it would make for a great effect for Christmas and holiday marketing! 


How to Create Your Own

Clicking on the above preview will bring you to CodePen where you can view the HTML, CSS and JavaScript that I used that you can add to your own site.

I've also created a HubSpot version that lets you quickly add new layers without having to go into the code at all. Here's a quick preview of how it works:


HubSpot Multi-Layered Animation1/ Click on "Add" to add a new layer


HubSpot Multi-Layered Animation

2/ Choose the image, set how far you would like it to go in percentage of the image (distance) and how long you would like it to take to get to that point in seconds (duration)


For those curious as to how it's set up, the module uses three fields (an Image field sog_background_image, a Number field sog_transition_duration and a Number field sog_distance) which are grouped into a repeater Field Group sog_layer as you can see in the right-hand sidebar below:

HubSpot Multi-Layer Animation Custom Module

And the code used in each of the fields is as follows: 


Find it here


Find it here.


Find it here.


If you're familiar with HubSpot Custom Modules, you should be able to use the above to recreate the module on your own portal.

The module can be dragged into any template in any column size: it's fully responsive and should adapt to the content around it (I used some cool tricks to make sure that's the case!). You can view a demo of the module on a HubSpot page here

If you have any questions on the module, let me know in the comments or get in touch

Topics: custom-module, marketplace, parallax, christmas

Join the Conversation!

Do you have a question, feedback or comments on this post?