Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Example of CSS3 translate3d() Method</title> <style> .container{ width: 125px; height: 125px; perspective: 500px; border: 4px solid #e5a043; background: #fff2dd; margin: 30px; } .transformed { -webkit-transform: translate3d(25px, 25px, 50px); /* Chrome, Safari, Opera */ transform: translate3d(25px, 25px, 50px); /* Standard syntax */ } </style> </head> <body> <h2>Before Translation:</h2> <div class="container"> <img src="/examples/images/diamond.jpg" alt="Diamond Card"> </div> <h2>After Translation:</h2> <div class="container"> <img src="/examples/images/diamond.jpg" class="transformed" alt="Diamond Card"> </div> </body> </html>