Problem:
Using custom image fields, the client wants an image swap effect when hovering over the main image.
Solution:
It is straightforward to do it with two separate images just using CSS.
Output the two images inside a wrapper div with some specific class you can target, and then add some custom CSS.
The solution would look something like this:
// the markup <div class="hover-effect"> [types field="first-image"][/types] [types field="hover-image"][/types] </div> // custom CSS .hover-effect img:last-child { display:none } .hover-effect:hover img:first-child { display:none } .hover-effect:hover img:last-child { display:inline-block }
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | - |
- | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | - |
Supporter timezone: Europe/London (GMT+00:00)
This topic contains 2 replies, has 2 voices.
Last updated by 6 years, 5 months ago.
Assisted by: Nigel.