A user seeks to implement hover effects on product banners within a specific page, where mousing over displays a different image.
Proposed Solutions:
Add CSS code to the theme’s base.css file using .product-banner:hover img { content: url('URL_OF_SECOND_IMAGE'); }
Alternatively, insert custom CSS through Shopify’s Theme Customizer under Custom CSS settings
Adjust the CSS selector to match the site’s HTML structure
Open Questions:
The original poster asks whether the CSS solution will work for multiple banners with different hover images
Concerns raised about whether the code would affect all images site-wide rather than just the specific page
One responder requested access to the page code to provide more tailored guidance
Status: Discussion remains ongoing with implementation details being clarified. The user has not yet confirmed which approach they’ll use or whether they’ve successfully tested the solutions.
Summarized with AI on November 3.
AI used: claude-sonnet-4-5-20250929.
I have a page on my website where I have some product banners, I was curious if there is a way to add a hover effect that changes the image to a different one when you mouse over it?
To add a hover effect that changes the image, you can use CSS. In your Shopify admin, go to Online Store > Themes > Actions > Edit code. Open your base.css file under the Assets folder and add this code:
Replace ‘URL_OF_SECOND_IMAGE’ with the link to the image you want to display on hover. Make sure your product banners have a class like product-banner, or adjust the selector to match your site’s structure. Save your changes, and refresh your page to test it out. Let me know if it worked for you, and feel free to mark this as a solution!