简体   繁体   中英

Smooth CSS animation with sprite

I have tried to animate my sprite and it is similar to this . I would appreciate if someone can show how to make it more smooth. I have only 3 images in my sprite with approx. 1 second delay, so the transition is quite bad.

I've tried to use:

from {
    -webkit-transform: translateX(..);
}
to { 
    -webkit-transform: translateX(..);
}

But it did not work. I would really appreciate any help.

try to add some transition effects like :

-webkit-transition: all 1s ease;
-moz-transition: all 1s ease;
-ms-transition: all 1s ease;
-o-transition: all 1s ease;
transition: all 1s ease;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM