0

I am trying to do the hover effect with different size images. I would like to know if there is a way to always hide on of the pictures while the other one is being hovered?

Thanks!

  • Welcome to StackOverflow. can you [create minimal example](https://stackoverflow.com/help/minimal-reproducible-example)? – Rayees AC Sep 23 '20 at 09:06
  • Yup you can do it with JS and CSS. make a condition when the cursor is on a particular image the other image will hide. – Vincent Dante Sep 23 '20 at 09:22
  • I think you can do it only with CSS. You can assign a different class to each image and then use ':hover' to affect others images. – Mathieu Rios Sep 23 '20 at 09:33
  • If you are looking to affect other images in the same container as the one that is hovered, look for sibling element hover solutions. Example: https://stackoverflow.com/a/12574716/762640 – eye-wonder Sep 23 '20 at 10:14

0 Answers0