Crossfade Backgrounds for Bricks
Crossfade Backgrounds adds a group of settings to Section, Container, Block and Div. Tick one box, add several images, and they crossfade behind the content.
Version: 0.1.0 · Requires: Bricks Builder, WordPress 6.5+ and PHP 8.1+ · See the live demo
Please note: this is an early release. It has been run on this playground but not yet tested widely, so stage & back up before using it on a live site.
Using it
- Select a Section, Container, Block or Div and open Style, then Crossfade background.
- Tick Crossfade several background images and pick the images.
- Give the element a height or min-height, otherwise there is nothing for the images to sit behind.
Controls
- Time on each image and Fade duration, in milliseconds.
- Image fit (cover or contain) and position.
- Slow zoom on the visible image.
- Overlay colour over the images, for readable text.
Behaviour
- Only the first image loads at once; the next one loads just before it is needed.
- Cycling pauses when the element is off screen or the tab is hidden.
- Reduced motion shows the first image only. Without JavaScript the first image stays.
- The images are decorative and hidden from assistive technology.
Styling
Variables: --cfb-fade, --cfb-hold, --cfb-size, --cfb-pos and --cfb-overlay. Classes use the plugin’s own cfb- prefix.
Limitations
- The effect shows on the front end and in preview, not on the builder canvas.
- Images are layered behind the content with a negative stacking order, so the element becomes its own stacking context.
Changelog
- 0.1.0 — first release.