Create a mirror image with CSS


The flip effect is used to create a mirror image of the object. The following parameters can be used in this filter -

Parameter
Description
FlipH
Creates a horizontal mirror image
FlipV
Creates a vertical mirror image

Example

You can try to run the following code to create a mirror image

Live Demo

<html>
   <head>
   </head>
   <body>

      <img src="/css/images/logo.png" alt="CSS Logo" style="Filter: FlipH">
      <img src="/css/images/logo.png" alt="CSS Logo" style="Filter: FlipV">

      <p>Text Example:</p>

      <div style="width: 300;
         height: 50;
         font-size: 30pt;
         font-family: Arial Black;
         color: red;
         Filter: FlipV">CSS Tutorials</div>
   </body>

</html>

Updated on: 13-Mar-2020

602 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements