Skip to main content

Why does my background style transition animation play on page load?

Learn why background style transition animations trigger on page load in repeating groups, and how to prevent it by adjusting image layout settings.

Written by Sofia Maconi
Updated this week

When using background style transitions in a repeating group, enabling both "Make this image as wide as the parent element" and "Center the image" causes the transition animation to fire immediately on page load for the first item. This is a CSS limitation — centering an element can trigger a transition as soon as the page renders, and there's no reliable way to prevent it from Bubble's side.

What you might notice

  • The background transition animation plays automatically when the page loads, before any user interaction

  • Only the first repeating group item is affected on load

  • The animation behaves as expected (only on "show next") when either "Make this image as wide as the parent element" or "Center the image" is disabled

Workaround

Uncheck one or both of the following image settings on the affected element:

  • Make this image as wide as the parent element

  • Center the image

Disabling either setting will prevent the transition from triggering on page load. Depending on your layout needs, you may be able to achieve a similar visual result with just one of these options enabled.

Status

This is caused by a CSS limitation rather than a Bubble bug, so we don't have a fix planned. The workaround above should resolve the issue for most cases.

Did this answer your question?