Among these new properties are some amazingly powerful codes for animated content on the page. It’s now possible for frontend web developers to craft a dynamic website using only HTML and CSS code. But is this really the most viable option?
Speed & Efficiency
jQuery wasn’t created to be an animation library. In fact, a secondary library jQuery UI was created with some animation functionality, but that still wasn’t the overall goal. I would still honestly suggest using jQuery for simple stuff because it’ll be much more supported in comparison with CSS3 transition effects.
Levels of Control
But CSS3 is enticing because the animation properties are added directly onto the element.
Many times you’ll find animation effects online that just seem ridiculous. It’s really cool to build an animated printer or snowfall effect – but this kinda stuff doesn’t have much practical value. Web design is always about the user first. Therefore your animation should enhance the user experience and not just add pretty frills onto the page.
So what does have value? Well for starters you might try loading animations like spinners and animated graphics. These elements denote when a page is in the middle of loading or preloading resources. You might also want to create dynamic effects in a carousel or perhaps a contact form with label hints for each field.
Getting down into the meat & potatoes there is a lot of pragmatic stuff you can build with animated effects. For example, dropdown menus and tabbed widgets are built upon hidden content. When a user interacts with the menu or tab links the invisible content is swapped into view.
My honest recommendation when it comes to animated effects is to keep it all simple. If you’re gonna go overboard make sure that it really fits into the layout style. For example, a cartoony layout can get away with exaggerated animation effects to replicate the squash and stretch effect found in cartoons. Try out lots of different ideas and see what type of animation you like the most.
If you’re adamant to learn in-depth CSS3 animation then you’ll have to get into keyframing. The generic transition effects can be useful for simple stuff, but they really just scratch the surface. Keyframe animation gives the developer so much more control over which elements are moving, how they’re moving, and where they end up.
CSS-Tricks has an excellent guide on keyframe syntax which I recommend you attempt to memorize. There are a few browser prefixes which can be difficult to retain in your head, so alternatively you might store this code as a snippet. Also check out the Mozilla @keyframes reference documentation for in-depth info.
Frontend development has advanced so quickly over the past few years. I never would have imagined something like keyframes being implemented into CSS when I first began studying web design in 2005. So much has changed and if you want to keep up with the times, you’ll have to at least try to change your methods as well.
Additionally if you want to push your CSS skills to the next level it’s worth learning about SASS. That stands for Syntactically Awesome StyleSheets and it basically allows developers to compile CSS code much like a programming IDE. If you take the time to learn SASS it will save you hours of copying & pasting code. The Animate.css library even has a SASS version to give you a starting point.
Ultimately it is your decision and there’s no wrong answer. Take this as an exploration into modern web animation and mix it up with each project. Don’t be afraid of pushing boundaries to see how far you can go.
Author: Jake Rocheleau
Jake is a creative designer, illustrator, and web developer. He frequently writes articles involving new-age design concepts and freelance management skills. You can find him in Google or follow his tweets @jakerocheleau