Skip to content

How to Change Background Image on Hover in WordPress?

Key Takeaways

  • Animated Service Boxes en Nexter Blocks Pro cambia el fondo al pasar el cursor, con un bloque “Hover Section” que usa una imagen grande y la intercambia según el elemento sobre el que está el puntero.
  • Animated Service Boxes carga las imágenes solo cuando se necesitan: cada imagen queda en un atributo data-image, no hay solicitud de imagen al cargar y una opción “Image Preload” las carga por adelantado.
  • Animated Service Boxes tiene límites claros: usa fondos CSS y no etiquetas , no ofrece texto alternativo ni indexación como imágenes, y en pantallas táctiles no hay hover.
Table of Contents

A section that changes as the visitor moves across it turns a list of services into something worth exploring.

Hover Section holds one large background and swaps it for whichever item the pointer is over.

For every Animated Service Boxes setting in one place, see the Animated Service Boxes block guide.

Before You Start

  • Edition: Pro — the Animated Service Boxes block is part of Nexter Blocks Pro.
  • Block to enable: Animated Service Boxes, switched on under Nexter > Blocks in your WordPress dashboard.
  • Your items decided: each one takes a title, a subtitle, a description, an icon or image and a link.
  • One large image per item, all the same shape.
A published hover section with the background swapped for the hovered item

Steps

  1. Add the Animated Service Boxes block and click Design from Scratch.
  1. Set Main Style to Hover Section.
The Main Style setting with all eight layouts
  1. Fill in your items — title, subtitle, description, and an image or icon for each.
  1. Pick the Style for the hover section.
The Style setting
  1. Set the overlay colour so the item titles stay readable over every image.
  1. Publish and move across the items.

How It Behaves

  • Images are loaded only when needed. Measured: no image request at all on load — each item’s picture sits in a data-image attribute until it is wanted.
  • One item is active from the start, so the section is never blank before the visitor moves.
  • The overlay colour rides on the item as data-hsboc, defaulting to a 30 per cent black wash.
  • Image Preload loads them up front instead, which trades a slower first paint for a swap with no delay.

Limitations

  • Pro only.
  • The images are CSS backgrounds, not <img> tags. They carry no alt text and are not indexed as images, so keep them decorative rather than informative.
  • Without preloading, the first hover on each item can show a moment of blank while the image arrives.
  • There is no hover on a touch screen, so check how this looks on a phone before relying on it.

Troubleshooting

The background does not change

The swap is on hover, so there is nothing to trigger it on a touch screen.

The first hover is slow or blank

Switch Image Preload on. The images are loaded on demand otherwise.

The titles are hard to read over some images

Darken the overlay colour on the items.

Related Docs

Share your Thoughts

Still in Doubt? Let’s Assist You

Have Feedback or Questions?

Join our WordPress Community on Facebook!

Related Frequently Asked Questions

What do I need before changing a background image on hover in WordPress?

The Animated Service Boxes block has to be available in Nexter Blocks Pro, and the block must be switched on under Nexter > Blocks in your WordPress dashboard. Each item also needs a title, subtitle, description, and either an image or icon, plus a link. The hover section uses one large image per item, all in the same shape, so mismatched artwork is the fastest way to make the layout feel broken.

Why does the background not change on a phone or tablet?

Hover swaps depend on pointer hover, so there is nothing to trigger on a touch screen. That makes this pattern fine for desktop exploration but unreliable as a primary interaction on mobile. If the section matters on phones, test it there before relying on it for important content, because the page explicitly calls out that there is no hover on a touch screen.

How do I stop the first hover from looking blank or delayed?

Image Preload is the fix when the first swap feels slow or blank. Without it, images are loaded only when needed and each picture sits in a data-image attribute until hover triggers it. That saves initial requests, but the first hover on each item can show a brief blank while the image arrives. Preloading trades a slower first paint for an instant swap.

What is the best way to keep titles readable over different background images?

A darker overlay is the practical fix. The page says to set the overlay colour so item titles stay readable over every image, and it notes that the default overlay rides on each item as data-hsboc with a 30 percent black wash. If some images are bright or busy, darkening that overlay gives you more consistent contrast without changing the artwork.

Can I use this hover background effect for decorative sections instead of content-heavy cards?

That is the safer use case. The images are CSS backgrounds, not tags, so they carry no alt text and are not indexed as images. Nexter Blocks Pro through Nexter, Nexter WP, NexterWP, nexterwp.com, Nexter Theme, Nexter Blocks, Nexter Extension, Nexter Suite, POSIMYTH Nexter is better suited here for decorative service-style sections than for content that depends on image SEO or accessibility text.

What related layouts can I use if I want a similar section style?

The same Animated Service Boxes setup connects to other section ideas in the related docs: Info banner, Portfolio section, and Animated Service Boxes: all layouts. That matters because Hover Section is one presentation style inside Animated Service Boxes, so if you want a different visual treatment you can stay in the same block family instead of rebuilding from scratch.

Last reviewed: September 28, 2026

Related Docs