Divi Scrolling Effects with Transform on Hover

aniaromanska

Written by Ania Romańska

Published on . Last edited on .

Overlapping images with Divi Scroll Effects and a hover Transform

TL;DR

Divi Scroll Effects are in Advanced → Scroll Effects in Divi 5 and Divi 4: Vertical Motion, Horizontal Motion, Fading In & Out, Scaling Up & Down, Rotating and Blur.

In Divi 5, a hover Transform on a module that also uses Scroll Effects is ignored, because the scroll effect's CSS rule (body[data-scroll-step] .et_pb_image_0) is stronger than the module's :hover rule. In Divi 4 it made the image jump.

The fix: add the hover Transform (Design → Transform) to the parent Column, or in Divi 5 to a Group around the module, and keep the Scroll Effects on the module.

In the free layout each Column has Scale 115% (120% on hover) and its own Z Index (12, 10, 4), so the scaled images overlap in a set order.

The free Overlapping Images layout (built in Divi 4.3) imports into Divi 5, converts automatically and keeps its scroll and hover effects (tested on Divi 5.18).

Updated for Divi 5: Scroll Effects still live in Advanced ➜ Scroll Effects and Transform in Design ➜ Transform, and the tip below matters even more in Divi 5. I tested it on Divi 5.18: a hover Transform on a module that uses Scroll Effects does nothing at all, so put the hover effect on the Column (or on a Group around the module). The free layout converts to Divi 5 without changes.

Have you played with the Divi Scroll Effects?

Divi Scroll Effects animate a section, row, column or module while the visitor scrolls: the element can move up and down or sideways, fade, scale, rotate or blur, depending on where it is on the screen. You find them in Advanced ➜ Scroll Effects, in Divi 5 and in Divi 4.

This awesome feature was introduced in Divi 4.3 and allows us to add advanced (and fun!) animations which react to the page scroll. You can add Scroll Effects to any Section, Row, Column or Module, and the animation follows the scroll: it depends on how far and in which direction your website visitor is scrolling.

In Divi 5 the six effects are called Vertical Motion, Horizontal Motion, Fading In & Out, Scaling Up & Down, Rotating and Blur. Each one has a start, middle and end value, and a Motion Effect Trigger (Middle, Top or Bottom of Element) that decides when the animation starts.

So in this short post I've got two tips for you:

Tip no. 1: use Scroll Effects wisely

Use Scroll Effects on a few elements per page, not on everything: too much movement distracts your visitors and makes your content harder to read.

Do not go overboard with Scroll Effects! As in life: too much of anything is a bad thing! It is very important that you hold back from overdoing the scrolling bit. You don't want to distract your users with too much action, and you definitely do not want to make it harder for them to read your page content.

Tip no. 2: add the hover Transform to the Column, not the module

If a module uses Scroll Effects, don't add a hover Transform to that same module. Add it to the parent Column (or, in Divi 5, to a Group around the module): the hover effect then works on top of the scroll motion.

I've been playing with the effects, and the one obstacle I found was how they might not play nicely with the Transform options. I created an "Overlapping Images" section, and what I like to do with images is to add a subtle transformation on hover (scale it down or up, rotate a little bit). The problem was that when the Scroll Effect is used on an Image module, the Transform settings on hover didn't take into account the different position the image might be in (depending on the scroll offset). In Divi 4 this caused a not-so-pretty jump on hover and removed the transformation added through the Scroll Effects settings.

Before: hover Transform on the Image module (Divi 4)

Image with Divi Scroll Effects jumping when a hover Transform is added to the same Image module

After: hover Transform on the Column

Image with Divi Scroll Effects scaling smoothly on hover when the hover Transform is added to the Column

The solution? Add the hover Transform settings to the Column instead of the module. It works really well with images, take a look at the demo page!

What happens in Divi 5

In Divi 5 there's no jump, but there's no hover effect either. Divi 5 animates Scroll Effects with its own CSS rules (like body[data-scroll-step="127"] .et_pb_image_0), and these rules are stronger than the module's hover rule (.et_pb_image_0:hover), so the hover Transform is simply ignored.

I tested it on a Divi 5.18 page with three images that all use the same Scroll Effects: with the hover Scale on the Image module nothing happened on hover, while the same hover Scale on the Column, or on a Group around the image, scaled the image up nicely and kept the scroll motion going. So the tip is the same in Divi 5 and Divi 4.

How to combine Scroll Effects and a hover Transform, step by step

Put the image in its own Column (or Group), add the Scroll Effects to the Image module, and add the hover Transform to the Column or Group. These are the settings from the first set of my Overlapping Images layout:

Step 1: Add Scroll Effects to the Image module

  1. Open the Image module and go to Advanced ➜ Scroll Effects.
  2. Turn on Vertical Motion. In the layout the image moves from 2 (start) to 0 (middle) to -2 (end).
  3. Turn on Rotating. In the layout it rotates from 5° to 0 to -5°.

Step 2: Add the hover Transform to the Column

  1. Open the Column settings and go to Design ➜ Transform ➜ Scale.
  2. Set the Scale to 115% for the normal state.
  3. Switch the Scale setting to its Hover state and set it to 120%.

Step 3: Make the images overlap

Because every column is scaled to 115%, the images grow into each other and overlap. In the layout, the row uses the smallest gutter width (1), so the columns sit close together, and each Column has its own Z Index (Advanced ➜ Position ➜ Z Index: 12, 10 and 4) to decide which image is on top.

Using a Group in Divi 5

If your column holds more than one module, wrap the image in a Group (Divi 5) and add the hover Transform to the Group instead of the Column. The Scroll Effects stay on the Image module inside it. I tested this too: the image scales on hover and keeps moving on scroll.

Download the free Overlapping Images layout

The Overlapping Images layout is a free Divi page with three sets of overlapping images that use Scroll Effects on the images and a hover Transform on the columns, ready to import in Divi 5 or Divi 4.

See it in action on the live preview, then download it, simply import it and use it on your projects!

Free download

Overlapping Images with Scroll Effects Layout

A Divi page with three sets of overlapping images that move and rotate on scroll and scale up on hover, made with Divi's own Scroll Effects and Transform settings, no code. Works in Divi 5 and Divi 4.

Get the free download

I tested it in Divi 5.18: the layout converts on import, and the images move and rotate on scroll and scale up on hover, just like in Divi 4. After importing, pick your own menu in the Menu modules (at the top and bottom of the page) and swap the sample photos for your own.

Prefer images that float on their own, without scrolling? See how to create floating overlapping images in Divi. And if you find another clever use for Divi Scroll Effects, share it in my Divi Lovers Facebook group!

This article has been tagged with: Animations & Effects

Tags

Overlapping images with Divi Scroll Effects and a hover Transform

Table of Contents

Popular questions

Where are the Scroll Effects in Divi 5?

Open any section, row, column or module and go to the Advanced tab ➜ Scroll Effects. There you can turn on Vertical Motion, Horizontal Motion, Fading In & Out, Scaling Up & Down, Rotating and Blur, and choose the Motion Effect Trigger. It's the same place as in Divi 4.

Why doesn't my hover Transform work on a module with Scroll Effects?

Divi animates Scroll Effects with CSS rules like body[data-scroll-step="…"] .et_pb_image_0, which are stronger than the module's .et_pb_image_0:hover rule. In Divi 5 the hover Transform is ignored, in Divi 4 the image jumps. Add the hover Transform to the parent Column or a Group instead.

Can I use a Group instead of a Column in Divi 5?

Yes. Wrap the module in a Group, keep the Scroll Effects on the module and add the hover Transform (Design ➜ Transform) to the Group. I tested it on Divi 5.18: the image scales on hover and keeps its scroll motion.

Does the free Overlapping Images layout work in Divi 5?

Yes. Import the JSON file on a page (gear menu in the top-left corner ➜ Import) and Divi 5 converts it automatically. The scroll motion, the hover scale on the columns and the Z Index order all work after the conversion.

About the Author

Ania Romańska

I'm a Divi expert from Poland, with over 10 years building the templates and courses that make up Divi Lover. I'm also a mom of five, which taught me a thing or two about explaining things clearly the first time.

Psst!Black Friday is here.

Black Friday
40% off templates.
Early-bird prices on Divi 5 courses.

Your next Divi project just got a little cheaper.All templates and plugins are 40% off. Plus, grab my new Divi 5 Self-Study Courses at special early-bird prices before they open in January.

No code needed

Sale prices are already applied. Ends November 30.