Skip navigation
Currently Being Moderated

css transform:malfunction:

Aug 6, 2012 11:37 AM

I'm having a problem with transform not working as expected, and I can't seem to see why.

It should flip from one image to another. when I hover over it to test it, the image will suddenly only show me half of the picture. then rotate to the other side, but staying in half view. I tried tinkering with sizes, but got no result.

 

 

Can someone look at the code (below) and see the fix I'm not seeing (What did I do wrong, what am I missing?)

 

<div class="flip_container">

                              <div id="flipone">

                                             <div class="front"></div>

                                             <div id="backone"></div>

                              </div>

</div>

 

.flip_container

{

  width: 160px;

  height: 125px;

  position: relative;

}

 

#flipone

{

  width: 100%;

            height: 100%;

  -webkit-transform-style: preserve-3d;

  -webkit-transition: -webkit-transform 1s;

 

}

 

.front {

  width: 100%;

            height: 100%;

  position: absolute;

            background-image: url(../Images/skate.jpg);

  -webkit-backface-visibility: hidden;

  border: 1px solid white;

}

 

#backone {

  width: 100%;

            height: 100%;

  position: absolute;

            background-image: url(../Images/effect_bg.png);

  -webkit-transform: rotateY(180deg);

  -webkit-backface-visibility: hidden;

}

 

#flipone:hover{

  -webkit-transform: rotateY(180deg);

}

 
Replies
  • Currently Being Moderated
    Aug 7, 2012 7:39 AM   in reply to JonnyDL

    It would be a lot easier for others to help if you posted a link to a test page so it's possible to see what's actually happening.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points