Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS How to make image look like it is rotating?

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #256191
    ChristianSirolli
    Participant

    I want to take an image and make it look like it is rotating along its X-axis. How can I do this? Here is what I have so far:

    CodePen

    Basically, I want the Hershey Bar pic to look like it is rotating on its X-axis. Any ideas?

    #256234
    JeroenR
    Participant

    In your animation, you’re changing the width, which gives you the idea the image is rotating along the y-axis. Why not use the height then?
    Or, another way is using rotation, like this:

        0%   {transform: rotateX(0deg);}
        50% {transform: rotateX(90deg);}
        100% {transform: rotateX(0deg);}
    
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.