I currently have it like this:
http://jsfiddle.net/9DGb2/
But for some reason if I change the css to this:
div {
width: 200px;
height: 100px;
background-color: yellow;
}
div:hover {
-moz-transform: scale(1.05) slow;
-webkit-transform: scale(1.05) slow;
-o-transform: scale(1.05) slow;
-ms-transform: scale(1.05) slow;
-webkit-transform: scale(1.05) slow;
transform: scale(1.05) slow;
}
It wont work.
So I am guessing it cant be done this way?
ease - specifies a transition effect with a slow start, then fast, then end slowly (this is default) linear - specifies a transition effect with the same speed from start to end. ease-in - specifies a transition effect with a slow start. ease-out - specifies a transition effect with a slow end.
CSS syntax example for scale Don't forget to add a transition! Without applying transition, the element would abruptly change sizes. Add the transition to the parent selector (not the hover selector). To make the transition smooth on both hover-over/hover-off.
You need to add a transition
-webkit-transition: transform 2s ease-in-out;
JS Fiddle Demo
For more information please consult: Using CSS Transitions
transition in other browser
div:hover {
-moz-transform: scale(1.05);
-webkit-transform: scale(1.05);
-o-transform: scale(1.05);
-ms-transform: scale(1.05);
-webkit-transform: scale(1.05);
transform: scale(1.05);
-webkit-transition: transform 1.05s ease-in-out;
-moz-transition:transform 1.05s ease-in-out;
-ms-transition:transform 1.05s ease-in-out;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With