Basic Animations in CSS and Javascript for Prototypes

Basic Animations in CSS and Javascript for Prototypes

Motion design is getting more important everyday when it comes to design interfaces that engage with the user both functionally and emotionally. Because of this, I started practicing with Javascript and jQuery to create basic animations for my prototypes. One of the most common animations comes into play when you want to build a list or animate items in a chain. To illustrate that today I share a simple technique I use for my prototypes.

For this little tutorial we will play with some HTML, CSS and Javascript. The whole process won’t take more than 30 minutes.

Step 1

Start a new HTML document and add some elements, one “Section” and then a list “UL” with a few objects “LI”

Step 2

Now lets import jQuery and jQuery Transit plugin to help us animate the list.

Step 3 – Animating the list

To animate the list is pretty simple, the first and most important thing to do is to have a little script of what you want to animate. In this first case we will animate one LI at the time fading in and sliding down from the top.

So what we are doing in that function is to find each “LI”strong> and then for each one we will set with CSS to move them “-30px”strong> in the Y axis (top) and change the opacity to 0. After that with jQuery Transition we will move it back to the original position. To make sure each one move at different time we will set a delay to 200 and multiply that by “i” (each element have their unique “i”).

Step 4 – some 3D rotations

The only thing we added here was the rotateX and transformOrigin for the CSS and perspective and rotateX for the transition. You can play with these values to change the animation as well.

Conclusion

Below you can see a basic example of what you can do with simple Javascript. The best thing about these animations is that they use the GPU, that means they run very smooth in mobile devices and are perfect for mobile prototypes.

See the Pen uqnjH by Fabio Sasso (@abduzeedo) on CodePen

Posted in Blog | Comments Off on Basic Animations in CSS and Javascript for Prototypes

Daily Inspiration #1607

Daily Inspiration #1607

This post is part of our daily series of posts showing the most inspiring images selected by some of the Abduzeedo’s writers and users. If you want to participate and share your graphic design inspiration, You can submit your images and inspiration to RAWZ via http://raw.abduzeedo.com and don’t forget to send your Abduzeedo username; or via Twitter sending to http://twitter.com/abduzeedo

Do you want to see all images from all Daily Inspirations? Check out http://daily.abduzeedo.com

AoiroStudio

Digital art selected for the Daily Inspiration #1607

Digital art selected for the Daily Inspiration #1607

Digital art selected for the Daily Inspiration #1607

Digital art selected for the Daily Inspiration #1607

DesignYouTrust

Digital art selected for the Daily Inspiration #1607

Digital art selected for the Daily Inspiration #1607

Digital art selected for the Daily Inspiration #1607

Digital art selected for the Daily Inspiration #1607

Designspiration.net

Digital art selected for the Daily Inspiration #1607

Digital art selected for the Daily Inspiration #1607

Digital art selected for the Daily Inspiration #1607

Digital art selected for the Daily Inspiration #1607

Fabio

Digital art selected for the Daily Inspiration #1607

Digital art selected for the Daily Inspiration #1607

Digital art selected for the Daily Inspiration #1607

Fabiano

Digital art selected for the Daily Inspiration #1607

Digital art selected for the Daily Inspiration #1607

Digital art selected for the Daily Inspiration #1607

Digital art selected for the Daily Inspiration #1607

SerialThriller

Digital art selected for the Daily Inspiration #1607

Digital art selected for the Daily Inspiration #1607

Digital art selected for the Daily Inspiration #1607

Digital art selected for the Daily Inspiration #1607

Send your suggestions via Twitter to http://twitter.com/abduzeedo using #abdz in the end of the tweet.

@Daniel_Nelson

Digital art selected for the Daily Inspiration #1607

Digital art selected for the Daily Inspiration #1607

Digital art selected for the Daily Inspiration #1607

Digital art selected for the Daily Inspiration #1607

Send your RAWZ suggestions via Raw.Abduzeedo.com

akdesign

Digital art selected for the Daily Inspiration #1607

Arepo

Digital art selected for the Daily Inspiration #1607

artandcrime

Digital art selected for the Daily Inspiration #1607

Baptiste Chabot

Digital art selected for the Daily Inspiration #1607

Digital art selected for the Daily Inspiration #1607

bnick1

Digital art selected for the Daily Inspiration #1607

Digital art selected for the Daily Inspiration #1607

Digital art selected for the Daily Inspiration #1607

DevelChild

Digital art selected for the Daily Inspiration #1607

Emanuel Silva

Digital art selected for the Daily Inspiration #1607

for brands studio

Digital art selected for the Daily Inspiration #1607

gitanoscr

Digital art selected for the Daily Inspiration #1607

Ideo Architekci

Digital art selected for the Daily Inspiration #1607

Loci

Digital art selected for the Daily Inspiration #1607

luxuryaccommodations

Digital art selected for the Daily Inspiration #1607

Mootic

Digital art selected for the Daily Inspiration #1607

robin velghe

Digital art selected for the Daily Inspiration #1607

VCA

Digital art selected for the Daily Inspiration #1607

WIRTUO7

Digital art selected for the Daily Inspiration #1607

WW

Digital art selected for the Daily Inspiration #1607

Posted in Blog | Comments Off on Daily Inspiration #1607