Image Reflection in CSS

Reflection below the image:

Reflection above the image:



































Reflection to left of the image:

Reflection to the right of the image:

The Complete Code

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Varanasi Software Junction: Reflection Demo</title> <style> div{ border-color: black; border-width: 2px; border-style: ridge; } .vsjbelow { display: block; margin-left: auto; margin-right: auto; -webkit-box-reflect: below; } .vsjabove { display: block; margin-left: auto; margin-right: auto; -webkit-box-reflect: above; } .vsjleft { display: block; margin-left: auto; margin-right: auto; -webkit-box-reflect: left; } .vsjright { display: block; margin-left: auto; margin-right: auto; -webkit-box-reflect: right; } </style> </head> <body> <h1>Image Reflection in CSS</h1> <h2>Reflection below the image:</h2> <div style="width:100%;height:1200px ;overflow:auto ;"> <img class="vsjbelow" src="https://3.bp.blogspot.com/-py5FbTZgvjo/YDi1bsQq16I/AAAAAAAACB0/BxejbJBcHA4AVfkB33WYC3YlVmxElM7BwCK4BGAYYCw/s1600/Varanasi%2BSoftware%2BJunction%2BPhone%2BLogo.png"> </div> <h2>Reflection above the image:</h2> <div style="width:100%;height:1200px ;overflow:auto ;"> <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br> <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br> <img class="vsjabove" src="https://3.bp.blogspot.com/-py5FbTZgvjo/YDi1bsQq16I/AAAAAAAACB0/BxejbJBcHA4AVfkB33WYC3YlVmxElM7BwCK4BGAYYCw/s1600/Varanasi%2BSoftware%2BJunction%2BPhone%2BLogo.png"> </div> <h2>Reflection to left of the image:</h2> <div style="align:right;width:100%;height:1200px ;overflow:auto ;"> <img class="vsjleft" src="https://3.bp.blogspot.com/-py5FbTZgvjo/YDi1bsQq16I/AAAAAAAACB0/BxejbJBcHA4AVfkB33WYC3YlVmxElM7BwCK4BGAYYCw/s1600/Varanasi%2BSoftware%2BJunction%2BPhone%2BLogo.png"> </div> <div style="width:100%;height:1200px ;overflow:auto ;"> <h2>Reflection to the right of the image:</h2> <img class="vsjright" src="https://3.bp.blogspot.com/-py5FbTZgvjo/YDi1bsQq16I/AAAAAAAACB0/BxejbJBcHA4AVfkB33WYC3YlVmxElM7BwCK4BGAYYCw/s1600/Varanasi%2BSoftware%2BJunction%2BPhone%2BLogo.png"> </div> </body> </html>