I looked at the different answers posted here, but nothing worked for me ...
What: I have a div that is reduced to 0.6, and when the called should scale to 1 (100%).
Problem: In Firefox, #myDiv scales as intended, but nothing happens in Chrome or Safari (on Mac).
I have this DIV code:
#myDiv { -moz-animation: changeSize 1s ease-out .5s forwards; -webkit-animation: changeSize 1s ease-out .5s 0 forwards; -o-animation: changeSize 1s ease-out .5s forwards; -webkit-transform: scale(0.6); -moz-transform: scale(0.6); -ms-transform: scale(0.6); -o-transform: scale(0.6); transform: scale(0.6); display: inline-block; opacity:100; background-image: url(img.png); width: 154px; height: 28px; position: absolute; left: 145px; top: 5px; }
And keyframe animation to go up:
@keyframes changeSize { 0% {transform:scale(0.6)} 100% {transform: scale(1)} } @-moz-keyframes changeSize /* Firefox */ { 0% {transform:scale(0.6)} 100% {transform:scale(1)} } @-webkit-keyframes changeSize /* Safari and Chrome */{ 0% {transform:scale(0.6)} 100% {transform:scale(1)} } @-o-keyframes changeSize /* Opera */ { 0% {transform:scale(0.6)} 100% {transform:scale(1)} }
HTML:
Please let me know what I am missing here!
Thanks!
source share