Change image on hover - Forum | JoomShaper
Awaiting an answer SP Page Builder

Change image on hover

Asked by Pantelis P 5 years ago Last activity 5 years ago

Hello
I want to ask you if there is a way to change the image on hover , I mean i create an image addon but i want when someon passes over (hover) to change to a second image, is that possible?
Thank you in advance

3 replies

Ariba Staff

Hello

The only way to do this is to use css. Pseudo elements :: before, :: after. You can add them on hover. CSS Knowledge is required for this. The best css tutorials is here https://www.w3schools.com/css/default.asp

Use the CSS background-image property
You can simply use the CSS background-image propScreen Shot 2021-03-22 at 11.13.02 PM.png

Dmitry Goncharov

Alas, no! For several years, I have been asking you to make this kind of functionality in addons where images are used. But all requests are ignored.
There are a lot of ideas to implement, but the guys only do what they think is necessary.

Pantelis P Asked this

Hello
I have tried the raw html addon with this css code
a img:last-child {
display: none;
}
a:hover img:last-child {
display: block;
}
a:hover img:first-child {
display: none;
}
it is working but i want to add caption only to the first image and not to the hover image , any idea how to do this?

Log in to reply.