Reputation: 12041
So I'm working on this site: http://superfy.me and I have CSS3 transitions (currently only for Chrome) between the routes. Basically to perform the animation I do the following:
.preanimate
class which rotates the phasing out div to rotateY(0deg)
and the phasing in div to rotateY(180deg)
.animate
class which adds the -webkit-transition: -webkit-transform 0.5s;
.preanimate
class which removes the rotated transformsThis is the css:
#container,
#animate-container {
position: absolute;
top: 70px;
width: 100%;
height: 100%;
-webkit-transform-style: preserve-3d;
-webkit-backface-visibility: hidden;
}
#animate-container.preanimate,
#container {
-webkit-transform: rotateY(0deg);
}
#animate-container {
-webkit-transform: rotateY(-180deg);
}
.animate {
-webkit-transition: -webkit-transform 0.5s;
}
#container.preanimate {
-webkit-transform: rotateY(180deg);
}
#animate-container div,
#container div {
-webkit-backface-visibility: hidden;
-webkit-transform:translate3d(0,0,0);
}
So I'm experiencing the following issues:
Upvotes: 0
Views: 271
Reputation: 64254
It's an usual problem when moving coplanar things in 3D.
Set that:
.row {
-webkit-transform: translateZ(1px);
}
It makes the row stand above the parent, and solves the issue
Cool page, by the way !
Upvotes: 2
Reputation: 202
You can add keyframes to make the animation. You can check it out here.
https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Using_CSS_animations
Upvotes: 1