How to flip an image on hover using CSS ?
In this article, you will learn how to flip an image (add mirror effect), both horizontally and vertically when the mouse has hovered over it. This can be done by applying the transformation to the image as shown in the following example:
Example 1: This example represents how to flip image horizontally by transforming it along the X-axis using transform: scaleX(-1) property.
Example 2: This example represents how to flip image vertically by transforming it along the Y-axis using transform: scaleY(-1) property.
Attention reader! Don’t stop learning now. Get hold of all the important Comcompetitivepetitve Programming concepts with the Web Design for Beginners | HTML course.