Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS rotation slow

http://jsfiddle.net/egEq2/

.badge {
    -webkit-transform-style: preserve-3d;
    -webkit-perspective: 1000;
    position: relative;
}   
.back, .front {
    position: absolute;
    -webkit-backface-visibility: hidden;
    -webkit-transition: -webkit-transform 1s ease-in;
    width: 100%;
    height: 100%;   
}
.back {
    -webkit-transform: rotateY(180deg);
    overflow: hidden;
}   
.front {
}
.product-action {
    display: inline-block;
}   
.product-action:hover .back {   
    -webkit-transform: rotateY(0deg);
}
.product-action:hover .front {      
    -webkit-transform: rotateY(-180deg);
}​

... works, but flips too slow, can I change the speed?

Also, can I add width somehow so the flip looks like a board and not a thin paper? :)

Thanks!

like image 868
eozzy Avatar asked Sep 16 '12 18:09

eozzy


1 Answers

You specified the speed already:

-webkit-transition: -webkit-transform 1s ease-in;
                                      ^^

Change it to something like 0.3s: http://jsfiddle.net/egEq2/1/

like image 195
Blender Avatar answered Sep 28 '22 08:09

Blender