Consider the following fiddle
p {
-webkit-transform: translate(-100%, 0);
-moz-transform: translate(-100%, 0);
-ms-transform: translate(-100%, 0);
-o-transform: translate(-100%, 0);
transform: translate(-100%, 0);
-webkit-transition: transform 1s ease-in;
-moz-transition: transform 1s ease-in;
-o-transition: transform 1s ease-in;
transition: transform 1s ease-in;
}
a:hover + p {
-webkit-transform: translate(0, 0);
-moz-transform: translate(0, 0);
-ms-transform: translate(0, 0);
-o-transform: translate(0, 0);
transform: translate(0, 0);
}
The transition works smoothly in FF but there is no transition at all in Safari or Chrome (on my Mac).
Has the transition property to be prefixed or is there some kind of syntax error in my code?
Add the vendor prefix in the transitions:
p {
-webkit-transform: translate(-100%, 0);
-moz-transform: translate(-100%, 0);
-ms-transform: translate(-100%, 0);
-o-transform: translate(-100%, 0);
transform: translate(-100%, 0);
-webkit-transition: -webkit-transform 1s ease-in; /* Changed here */
-moz-transition: -moz-transform 1s ease-in;
-o-transition: -o-transform 1s ease-in;
transition: transform 1s ease-in;
}
a:hover + p {
-webkit-transform: translate(0, 0);
-moz-transform: translate(0, 0);
-ms-transform: translate(0, 0);
-o-transform: translate(0, 0);
transform: translate(0, 0);
}
Update (05/06/2014)
To answer some comments, the reason for omitting -ms-transition
, is that it has never existed.
Check: