Change text to an image on hover or focus
Text-to-image hover playground
Hover a card, Tab to its link, or enable the preview switch. Select a card to jump to its sample description. On touchscreens, illustrations and labels stay visible.
Explore the coast
Explore the mountains
Explore the forestCoastal illustration
A flat-color coastal scene. The image is a decorative preview; this heading remains a normal link destination.
Alpine illustration
A mountain-and-lake illustration. Keyboard focus reveals the same preview as pointer hover.
Forest illustration
An evergreen scene. On a touchscreen, the image and caption are visible without requiring hover.
Pure HTML and CSS. No JavaScript, framework, account or external image service is required.