desandro / 3dtransforms

:package: Introduction to CSS 3D transforms
https://3dtransforms.desandro.com/
1.01k stars 163 forks source link

Replace with Images #28

Closed jakedurell closed 6 years ago

jakedurell commented 6 years ago

Hello,

The code works fine. I was trying replace the divs with images, as shown below. As a result, the cube looks as expected seemed to flip uunpredictably, coming closer to the user for the front, right, top and bottom, and further back when showing back and left. It seem to take the shortest path and not rest on a single set of axis. Any help would be much appreciated.

Thanks!

        <!-- <div class="cube__face cube__face--front">front -->
                <img class="cube__face cube__face--front smaller-image thin-img-border" src='./Image.jpeg' alt="Image">
        <!-- </div>
        <div class="cube__face cube__face--back">back -->
                <img class="cube__face cube__face--back smaller-image thin-img-border" src='./Image.jpg' alt="Image">
        <!-- </div>
        <div class="cube__face cube__face--right">right -->
                <img class="cube__face cube__face--right smaller-image thin-img-border" src='./Image.jpg' alt="Image">
        <!-- </div>
        <div class="cube__face cube__face--left">left -->
                <img class="cube__face cube__face--left smaller-image thin-img-border" src='./Image.jpeg' alt="Image">
        <!-- </div>
        <div class="cube__face cube__face--top">top -->
                <img class="cube__face cube__face--top smaller-image thin-img-border" src='./Image.jpg' alt="Image">
        <!-- </div>
        <div class="cube__face cube__face--bottom">bottom -->
                <img class="cube__face cube__face--bottom smaller-image thin-img-border" src='./Image.jpg' alt="Image">
        <!-- </div> -->
    </div>
desandro commented 6 years ago

Sorry to hear you're having trouble. This article is a tutorial to help you get started. Sorry, but I am not able to provide personal support.