You’ve probably attracted by the animations presented in the new overpink’s website. If you haven’t, you’ve either been living under a rock or inside a McDonald’s big tasty. Today I’ll gonna show you the main steps to achieve this CSS-based animation.
There’s a lot of modern techniques not only the one I’ll explain, but the good news is that all of them are sharing the same concept of production.
This one will be a simple guide for the workflow and it’s CSS snippet that I’ve used.
for example: if it’s a car illustration.. then all of the shapes that makes the body of the car should be in a separate layer, the front wheel and the rear wheel also should be in separate layers.
Now use your skills to animate your illustration, or you can google it, there’s hundreds of tutorials for this step.
Now you have exported 15 PNG file if your animation time was 1 second for example, and they are ready to be collected in one Sprite Sheet.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
.animation{ width: 200px; height: 100px; background-image: url("images/sprite_sheet.png"); background-position: 0 0; -webkit-animation: animation_keyframes 2s steps(9) infinite; -moz-animation: animation_keyframes 2s steps(9) infinite; -ms-animation: animation_keyframes 2s steps(9) infinite; -o-animation: animation_keyframes 2s steps(9) infinite; animation: animation_keyframes 2s steps(9) infinite; } @-webkit-keyframes animation_keyframes { from { background-position: 0 -900px } to { background-position: 0 0 } } @-o-keyframes animation_keyframes { from { background-position: 0 -900px } to { background-position: 0 0 } } @-moz-keyframes animation_keyframes { from { background-position: 0 -900px } to { background-position: 0 0 } } @keyframes animation_keyframes { from { background-position: 0 -900px } to { background-position: 0 0 } } |
He is considered to be the most experienced and appreciative web developer and the creative director of overpink because of his experience in a lot of the creative fields, he always work on improving himself, but also helping the whole team to develop their knowledge that’s why he is one of the reasons behind overpink’s prosperity.
More Posts By Hossam Youssef