<body>
    <img class="img-1" src="https://i.pinimg.com/564x/4f/33/a0/4f33a0124e75f4c7d6ce340b0b5e410d.jpg">
</body>
    body {
        perspective: 1000px;
    }
    img {
        width: 300px;
        display: block;
        margin: auto;
        margin-top: 70px;
        transition: transform 1s;
    }
    img:hover {
        transform: translateZ(300px);
    }

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.