Learn How to Create 5 Incredible CSS Animations

Learn How to Create 5 Incredible CSS Animations

You’ve probably noticed that more and more CSS animation examples have been appearing on websites lately. Web designers are getting creative and using CSS animations to bring personality to their sites, capture complex ideas effortlessly, and subtly guide their users’ actions.

The golden rule here is that your CSS animations shouldn’t be overblown – even a subtle movement can have a big impact. The best animations you see online still can have their roots in Disney’s classic 12 principles of animation. 

Here, I’ve pulled together a selection of some interesting CSS animation examples from websites around the world, and dug into the code to show you how to achieve these effects yourself.

What is a CSS animation?

CSS animation is a method of animating certain HTML elements without having to use processor and memory-hungry JavaScript or Flash. There’s no limit to the number or frequency of CSS properties that can be changed. CSS animations are initiated by specifying keyframes for the animation: these keyframes contain the styles that the element will have.


1. Rising Bubbles

The CSS bubble animation that features on 7UP is a beautiful example of carrying a brand theme through into the website design. The animation consists of a few elements: the SVG ‘drawing’ of the bubbles and then two animations applied to each bubble. 

The first animation changes the opacity of the bubble and moves it vertically in the view box; the second creates the wobbling effect for added realism. The offsets are handled by targeting each bubble and applying a different animation duration and delay.

In order to create our bubbles we’ll be using SVG. In our SVG we create two layers of bubbles: one for the larger bubbles and one for the smaller bubbles. Inside the SVG we position all of our bubbles at the bottom of the view box.

<g class="bubbles-large" stroke-width="7">
  <g transform="translate(10 940)">
  <circle cx="35" cy="35" r="35"/>
<g class="bubbles-small" stroke-width="4">
  <g transform="translate(147 984)">
  <circle cx="15" cy="15" r="15"/>

In order to apply two separate animations to our SVGs, both utilising the transform property, we need to apply the animations to separate elements. The <g> element in SVG can be used much like a div in HTML; we need to wrap each of our bubbles (which are already in a group) in a group tag.

  <g transform="translate(10 940)">
  <circle cx="35" cy="35" r="35"/>

CSS has a powerful animation engine and really simple code in order to produce complex animations. We’ll start with moving the bubbles up the screen and changing their opacity in order to fade them in and out at the beginning and end of the animation.

@keyframes up {
  0% {
  opacity: 0;
  10%, 90% {
  opacity: 1;
  100% {
  opacity: 0;
  transform: translateY(-1024px);

In order to create a wobbling effect, we simply need to move (or translate) the bubble left and right, by just the right amount – too much will cause the animation to look too jaunting and disconnected, while too little will go mostly unnoticed. Experimentation is key with when working with animation.

@keyframes wobble {
  33% {
  transform: translateX(-50px);
  66% {
  transform: translateX(50px);
  } }

In order to apply the animation to our bubbles, we’ll be using the groups we used earlier and the help of nth-of-type to identify each bubble group individually. We start by applying an opacity value to the bubbles and the will-change property in order to utilise hardware acceleration.

.bubbles-large > g {
  opacity: 0;
will-change: transform, opacity;}
.bubbles-large g:nth-of-type(1) {...}
.bubbles-small g:nth-of-type(10) {...}

We want to keep all the animation times and delays within a couple of seconds of each other and set them to repeat infinitely. Lastly, we apply the ease-in-outtiming function to our wobble animation to make it look a little more natural.

.bubbles-large g:nth-of-type(1) {
  animation: up 6.5s infinite; }
.bubbles-large g:nth-of-type(1) circle {
  animation: wobble 3s infinite ease-in-out; }
bubbles-small g:nth-of-type(9) circle {
  animation: wobble 3s 275ms infinite ease-in-out; }
.bubbles-small g:nth-of-type(10) {
animation: up 6s 900ms infinite;}


2. Scrolling Mouse

A subtle scrolling mouse animation can give direction to the user when they first land on a website. Although this can be accomplished using HTML elements and properties, we’re going to use SVG as this is more suited to drawing.

Inside our SVG we need a rectangle with rounded corners and a circle for the element we’re going to animate, by using SVG we can scale the icon to any size we need.

<svg class="mouse" xmlns="..." viewBox="0 0 76 130" preserveAspectRatio="xMidYmid meet">
  <g fill="none" fill-rule="evenodd">
  <rect width="70" height="118" x="1.5" y="1.5" stroke="#FFF" stroke-width="3" rx="36"/>
  <circle cx="36.5" cy="31.5" r="4.5" fill="#FFF"/>

Now we’ve created our SVG, we need to apply some simple styles in order to control the size and position of the icon within our container. We’ve wrapped a link around the mouse SVG and positioned it to the bottom of the screen.

.scroll-link {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
.mouse {
  max-width: 2.5rem;
  width: 100%;
  height: auto;

Next we’ll create our animation. At 0 and 20 per cent of the way through our animation, we want to set the state of our element as it begins. By setting it to 20% of the way through, it will stay still for part of the time when repeated infinitely.

@keyframes scroll {
  0%, 20% {
  transform: translateY(0) scaleY(1);

We need to add in the opacity start point and then transform both the Y position and the vertical scale at the 100% mark, the end of our animation. The last thing we need to do is drop the opacity in order to fade out our circle.

@keyframes scroll {
  10% {
  opacity: 1;
  100% {
  transform: translateY(36px) scaleY(2);
  opacity: 0.01;

Lastly we apply the animation to the circle, along with the ‘transform-origin’ property and the will-change property to allow hardware acceleration. The animation properties are fairly self-explanatory. The cubic-bezier timing function is used to first pull the circle back before dropping it to the bottom of our mouse shape; this adds a playful feel to the animation.

.scroll {
  animation-name: scroll;
  animation-duration: 1.5s;
  animation-timing-function: cubic-bezier(0.650, -0.550, 0.250, 1.500);
  animation-iteration-count: infinite;
  transform-origin: 50% 20.5px;
  will-change: transform;


3. Spinning Circles

The animated loading icon is made up of four circles. The circles have no fill, but have alternating stroke-colours.

<svg class="loader" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 340 340">
  <circle cx="170" cy="170" r="160" stroke="#E2007C"/>
  <circle cx="170" cy="170" r="135" stroke="#404041"/>
  <circle cx="170" cy="170" r="110" stroke="#E2007C"/>
  <circle cx="170" cy="170" r="85" stroke="#404041"/>

In our CSS, we can set some basic properties to all of our circles and then use the :nth-of-type selector to apply a different stroke-dasharray to each circle.

circle:nth-of-type(1) {
  stroke-dasharray: 550; 
circle:nth-of-type(2) {
  stroke-dasharray: 500; 
circle:nth-of-type(3) {
  stroke-dasharray: 450;}
circle:nth-of-type(4) {
  stroke-dasharray: 300; 

Next, we need to create our keyframe animation. Our animation is really simple: all we need to do is to rotate the circle by 360 degrees. By placing our transformation at the 50% mark of the animation, the circle will also rotate back to its original position.

@keyframes preloader {
  50% {
  transform: rotate(360deg);

With our animation created, we now just need to apply it to our circles. We set the animation name; duration; iteration count and timing function. The ‘ease-in-out’ will give the animation a more playful feel. 

animation-name: preloader;
animation-duration: 3s;
animation-iteration-count: infinite;
animation-timing-function: ease-in-out;

At the moment, we have our loader, but all of the elements are rotating together at the same time. To fix this, we’ll apply some delays. We’ll create our delays using a Sass for loop.

@for $i from 1 through 4 {
  &:nth-of-type(#{$i}) {
  animation-delay: #{$i * 0.15}s;
} }

Due to the delays, our circle now animates in turn, creating the illusion of the circles chasing each other. The only problem with this is that when the page first loads, the circles are static, then they start to move, one at a time. We can achieve the same offset effect, but stop the unwanted pause in our animation by simply setting the delays to a negative value.

animation-delay: -#{$i * 0.15}s;


4. Flying Birds

We start with completely straight vector lines, drawing each frame of our animation, depicting the bird in a different state of flight. We then manipulate the vector points and round the lines and edges. Finally, we put each frame into an equally sized box and place them side-by-side. Export the file as an SVG.

The HTML setup is really simple. We just need to wrap each bird in a container in order to apply multiple animations – one to make the bird fly and the other to move it across the screen.

<div class="bird-container">
  <div class="bird"></div>

We apply our bird SVG as the background to our bird div and choose the size we want each frame to be. We use the width to roughly calculate the new background position. The SVG has 10 cells, so we multiply our width by 10 and then alter the number slightly until it looks correct.

.bird {
  background-image: url('bird.svg');
  background-size: auto 100%;
  width: 88px;
  height: 125px;
  will-change: background-position;
@keyframes fly-cycle {
  100% {
  background-position: -900px 0;

CSS animation has a couple of tricks you may not be aware of. We can use the animation-timing-function to show the image in steps – much like flicking through pages in a notebook to allude to animation.

animation-name: fly-cycle;
animation-timing-function: steps(10);
animation-iteration-count: infinite;
animation-duration: 1s;
animation-delay: -0.5s;

Now we’ve created our fly cycle, our bird is currently flapping her wings but isn’t going anywhere. In order to move her across the screen, we create another keyframe animation. This animation will move the bird across the screen horizontally while also changing the vertical position and the scale to allow the bird to meander across more realistically.

Once we’ve created our animations, we simply need to apply them. We can create multiple copies of our bird and apply different animation times and delays. 

.bird--one {
  animation-duration: 1s;
  animation-delay: -0.5s;
.bird--two {
  animation-duration: 0.9s;
  animation-delay: -0.75s;


5. Hamburger Crossing

This animation is used all over the web, turning three lines into a cross or close icon. Until fairly recently, the majority of implementations have been achieved using HTML elements, but actually SVG is much more suited to this kind of animation – there’s no longer a need to bloat your buttons code with multiple spans. 

Due to the animatable nature and SVG and its navigable DOM, the code to accomplish the animation or transition changes very little – the technique is the same. 

We start by creating four elements, be it spans inside of a div or paths inside of an SVG. If we’re using spans, we need to use CSS to position them inside the div; if we’re using SVG, this is already taken care of. We want to position lines 2 and 3 in the centre – one on top of another – while spacing lines 1 and 4 evenly above and below, making sure to centre the transform origin.

We’re going to rely on transitioning two properties: opacity and rotation. First of all, we want to fade out lines 1 and 4, which we can target using the :nth-child selector.

.menu-icon.is-active {element-type}:nth-child(1),
.menu-icon.is-active {element-type}:nth-child(4) {
  opacity: 0; }

The only thing left to do is target the two middle lines and rotate them 45 degrees in opposite directions.

.menu-icon.is-active {element-type}:nth-child(2) {
  transform: rotate(45deg); }
.menu-icon.is-active {element-type}:nth-child(3) {
transform: rotate(-45deg); } 

references: codepen, creativebloq

If you want to compare css animations vs javascript check out this guide.

If you want even more info check out these products below:

Learn How to Create an Animated Sprite with Photoshop

Learn How to Create an Animated Sprite with Photoshop

What You’ll Be Creating

In this guide, I will show you how to create an animated sprite with Photoshop, using just a few simple tools. In the process, I will cover all of the basic rules that you can apply to your future pixel art illustrations.

If you do not have a copy of Adobe Photoshop, I would recommend signing up for Adobe Photoshop CC (Creative Cloud).

Here’s the official link:
Adobe Photoshop CC

Select the Pencil Tool from the Toolbar, it will be your primary instrument for this guide. Select a Hard Round brush in the Brush settings and apply the settings shown below. Your aim is to make the line absolutely sharp.

Brush Settings

Set up Pencil Mode for the Eraser Tool and use the same brush settings as below.

Turn on the Pixel Grid (View > Show > Pixel Grid). If you don’t see this item in the menu, go to Preferences > Performance and turn on the graphic acceleration.

Note: The grid will be seen only on a newly created canvas with zoom level 600%and above.

Show Pixel Grid
Use Graphic Acceleration

Go to Preferences > General (Control-K) and set up Image Interpolation to Nearest Neighbor. This will ensure that the edges of the objects you work with always stay sharp.

Preferences - General

Go to Preferences > Units & Rulers and choose Pixels in the drop-down menu near Rulers to see all measurements in pixels.

Preferences - Units  Rulers

Now that everything is set up, we can start creating the sprite.

Make a sketch of a character with a distinct silhouette, and try not to overload it with many details. It’s not important to paint the colors, the outline should be enough, as long as you understand how your character should look. I prepared a sketch of a space trooper for this guide.


Press Control-T or use Edit > Free Transform to scale down your character to 60px in height.

The size of the object is shown in the Info panel. Notice the Interpolation setting, it should be the same as we set in Step 4. In this case, it’s not that important, as we are only turning a sketch into pixel art, but pay attention to that feature in future when you work with pixelated objects.

Scale Down Character

Zoom in to the image by 300-400% to make it easier to render. Reduce the opacity of your sketch.

Create a new layer (Layer > New > Layer) and draw an outline of your character with the Pencil Tool.

If your character is symmetrical, like mine is, just create one half, duplicate it, and flip it horizontally (Edit > Transform > Flip Horizontal).

Outline Process

Rule of the Rhythm: Try to split complex shapes into simple elements. When pixels in the line form a “rhythm” like 1-2-3 and 1-1-2-2-3-3 the outline looks much better to the human eye than a randomly drawn line. However this rule can be broken if the shape requires it.

Rule of the Rhythm
Two rhythmic and one randomly drawn line.

When the outline is ready, choose main colors and paint large shapes. Do it on a separate layer beneath the one with the outline.

Painting Large Shapes

Smooth the inner side of the outline by adding shades of the color.

Adding Shades

Keep adding more shades. As you can see, I corrected some shapes and details along the way.

Adding Shades Process

Create a new layer to add the highlight.

Choose Overlay from the drop down menu on the Layer panel. Paint with a light color over the areas you want to highlight. Smooth the shape of highlighted area by choosing Filter > Blur > Blur.

Adding Highlight

I flipped the painted half horizontally, added final color touches here and there, and merged the layers.

Final Touches

The character now lacks contrast. Use Levels (Image > Adjustments > Levels) first and then change the tone or halftone with Color Balance (Image > Adjustments > Color Balance) to make warmer and cooler versions.

Tuning With Levels and Color Balance

I decided to go with the third version. Now let’s move on to the animation process.

Final Character
Final character with 400% zoom.

Create a copy of the layer (Layer > New > Layer Via Copy) and move it 1 pixel up and 2 pixels right selecting Move Tool (V) and using your arrow keys. This is the key phase for animating the running character.

Change the original layer’s Opacity to 50% to see previous frame of animation. This is called “Onion Skinning.”

Creating Next Frame

Now bend the character’s legs and arms as if it is running.

  • Select the left arm using Lasso Tool
  • Using Free Transform Tool (Edit > Free Transform) and holding Control move the container markers to lead the arm behind the back
  • Select the shank of the right leg and move it down as on the first frame – we need that leg stretched.
  • Select the left leg and move it up – this leg bends up
  • Using Pencil and Eraser Tools, redraw all the elbow parts of the right arm.
Creating Running Phase

Now you will need to redraw the new position of the legs and arms as I explained inSection 2 of this guide. This is because transforming the legs and arms will distort the pixels, and the shape will no longer be clean.

Finalizing Running Phase

Make the copy of the second layer and flip it horizontally. And now you have one idle position and two running phases. Select each layer and restore its Opacity to 100%.

Flipping Running Phase

Go to Window > Timeline to show Timeline panel and press Create Frame Animation.

Create Frame Animation

In the Timeline panel, perform the following steps:

  1. Choose Frame Delay time 0.15 sec
  2. Click on Duplicates Selected Frames button to add 3 more copies
  3. Change looping options to Forever
Duplicate Frames

To choose the proper layer for each animation frame, click on the Eye icon near the layer name in the Layer panel.

  • 1st frame: choose idle position
  • 2nd frame: choose the second layer
  • 3rd frame: choose idle position once again
  • 4th frame: choose the third layer
Choose Proper Layer For Each Frame

Press Space button to play the animation.

Final Animation Preview
Final animation with 100% zoom.

Now save your result. Go to File > Save For Web and select GIF format. Scale image size to 300% for better presentation and press Save.

Save For Web Settings

In this guide, I showed you how to draw and animate a pixel art character in Photoshop. In the process, you learned how to set up your canvas and tools, how to draw your character using the Pencil Tool, as well as how to animate your character using Photoshop‘s Timeline feature. I hope that you learned something from this guide and can use these techniques to create some pixel art of your own.

Final Animation

references: tutsplus

I’ve listed some related items that may be of interest to you:

Create an Animated Interface GIF with Photoshop

Create an Animated Interface GIF with Photoshop

Final product image
What You’ll Be Creating

Ever wanted to turn an app interface PSD into a fully animated demo for your clients or site? Turns out, you can use Photoshop for that, too.

In this tutorial, we will design a simple news iPhone app, and then animate it for client presentation and export it as a GIF file. You’ll learn everything you need to go from idea to animated demo, all inside any recent version of Photoshop.

We’ve used Photoshop CC in this tutorial, but CS5 or 6 would work as well to follow along. You will also need the following stock photo to complete this tutorial. Please download them before you begin, or substitute with a similar picture and adjust the steps accordingly:

First, we will start designing the app’s interface. Make a new file (Control-N) with canvas size 640 px by 1136 px, then click OK.

If instead you already have an app interface designed, you can open it in Photoshop and then jump to the Tap section of this tutorial.

new doc

Click View > New Guide to make new guide, which will help us in placing GUI elements accurately. Set it to Vertical with position 15 px.

guide in place

Add another vertical guide at each side of the canvas with 15 px distance between each guide.

15px guides

Draw another guide, this time horizontally at 40 px, 128 px, and 220 px.

horizontal guides
all guides in place

Add a status bar on the upper most section of your canvas. If you need detailed directions on that, check out the status bar section of our earlier tutorial How to Design an iOS 7 Email App in Photoshop.

Then, make a new layer and then select second section and then fill it a gray color,#2c3137.

status bar

Add the app’s title text on the top part of the interface.


Add a logo to the title. I just drew some simple rectangles for the logo, but if you have an existing app icon, you can just import it into a new layer.


Draw a magnifier icon using a combination of two circle shapes and a rounded rectangle, using the same color as the app logo. Place it on the right side of the app.

search icon

On the other side, draw four rounded rectangles for the option icon.


Make a new layer with a rectangle section that fits under the titlebar. Fill the next section with a gray color, just as the previous section.

next bar

Add a layer mask onto the layer, and then add a black to white gradient until the bottom is faded.


Add a menu using the Type Tool, containing the news categories. Set the first menu—in this case, the All option—to be bold, to indicate that the category is active. Duplicate it (Control-J) and then set other menu—in this case, Sport—to be bold, once again to indicate which category is selected.

Now, from the Layers panel, set the Sport menu Opacity to 0% to hide it, as we want the All category to be bold first.


Add a thin arrow for menu navigation, made of rounded rectangles.

nav arrow

Add another arrow onto the other side.

matching nav arrow

Fill the rest of the interface with the gray color. Make sure to put this background underneath all the GUI elements.


Draw a light gray rectangle for the individual news section background.

lighter background

Apply Stroke, Inner Glow, and Outer Glow to add more contrast to the news area. Double click the layer and then use the following settings from the screenshots below:

inner glow
outer glow

Draw a white rounded rectangle on the top part of the previous shape. We will put news image here.

news element

Apply Inner Glow into the white shape with the following settings:

news entry glow

Select a photo from the Tuts+ Stock Photo set you previously downloaded, or any other photos you’d like to use, and place it covering the white rounded rectangle shape.

photo in news

Hit Control-Alt-G to convert selected photo layer into a Clipping Mask. The photo will automatically go inside layer behind it. And, here’s what you see:A perfectly placed photo on top of the individual news area.

photo placement

Add text for the news content. Make sure to add contrast to the news text for a better reading experience by varying font type, color, and size.

styled text

Let’s add icons into the news element design. Draw two small rounded rectangles without Fill and 1 pt white stroke.


Double click the layer and then add layer style Color Overlay. Use #708196 for its color.

add color overlay

Repeat previous process, but this time uses a combination of a rounded rectangle and a rectangle.

another icon

Add a small circle shape. Now, we have a tag icon. Sweet!

tag and link icons

So far, this is our app design at 100% magnification.

100 magnified app UI

Add other individual news articles into the app by duplicating the news element layers, customizing them appropriately.

filled articles

Add bigger news area. This will be shown when an individual news is selected.

larger news area

Put all the individual news elements and big news stories in separate layer groups. You want to assure every layer is carefully placed into a layer group according to its element.

For example, you want each layer that made the first individual news section placed together in a layer group, and the elements for full-screen news articles in other groups. This will help you to work easier while making the animation.

layer groups

For now, we will not use this big news section. So, set its Opacity to 0%.

We now need to design the tap indicator. Make a new layer group and name it tap. Next, draw a white circle shape. Set its Opacity to 50%.

tap sector

Duplicate the circle shape by pressing Control-J. Make it larger, set stroke to 3 ptwith a white color, and remove the Fill color.

tap border

Add another circle shape, this time thinner. Set its stroke size to 2 pt.

thinner circle

Hide all the layers inside tap layer group we have just made, as you won’t want the taps to show up when the UI is first loaded, but instead will only display them when the animation is fixing to transition to a selected element.

Now, we’re finally ready to start building our UI animation. Open the Timeline panel and then make a new frame.


Make another new frame.

another new frame

Now it’s time to reveal the tap layer group. When showing a scrolling scene, hide the two stroked circles, and we are going to use this condition to indicate scroll gesture. It will appear more as a continuous stroke, whereas the outer stroked circles give a ripple appearance more consistent with a single tap to select an item.

scrolling circle

Change the duration to 1 second for first frame and 0.2 seconds for second frame.


Add another frame.

another new frame

Activate the Tap layer group and all the news grid layers. Use Move Tool to move them up in your list of layers.

move layer groups

To automatically make a smooth animation between current and previous frame, click Tween from Timeline panel menu.


Set the tween to 5 for the added frame.

tween of 5

Now, we have an animation of the news grid moving upward on each frame.

auto-generated news grid animation
news grid animation 2

If you think that the animation is too fast, you can make it slower by selecting all the frames and setting the duration to 0.2 seconds.

slower animation

Test the animation by clicking the play icon in the Timeline panel. Don’t forget to set the animation to Forever; this way the animation is looped.


Our current animation contains the news grid moving upward. In next frame, we need to put it back to previous condition so it will continue seamlessly with the first frame. To do this, copy the second frame and then paste it at the last position by choosing Paste After Selection in the dialogue box.

copy frame
paste frame
paste after selection

Apply the Tween command again to make a new animation between last and next-to-last frames.

tween again
5 frame tween

Add a new frame and hide the tap indicator.

hidden tap

So far, this is the animation we get, which gives us a basic scrolling UI.

animated UI scroll

Now it’s time to animate the selection of a link in the menu. First, make a new frame. In this frame, set the Opacity text menu with the selected bold variant of All from the menu set to 0% and Sport‘s selected variant’s transparency set to 100%.

bold sport

Activate the Tap layer group and reveal all its layers. Change frame duration to 0.2 seconds.

add a tap

Make a new frame with a duration of 0.1 seconds. This time hides the thinnest stroked circle.

hide outer circle

Add another frame and hide next stroked circle.

hide next circle

Add a new frame and hide the tap layer group.

hide tap

Make a new frame and then set the Opacity of every news story in the grid without the sport tag to 0%.

hide non-sport stories

Still in this frame, drag the individual sports news stories upward in the grid, filling empty spaces above them.

filled sport story sections

Tween between current frame and the previous. For faster animation, set added frames to 3.

animate change

Set duration in the last frame to 2 seconds.

2 second last frame

For this tap, this is the animation we have.

sport animation

Next, we are going to select one of the news articles and reveal it in full screen. First, make new frame with duration 0.2 seconds and then reveal all layers inside the Tap layer group.

tap news start

Add new frame and then set its duration to 0.1 seconds. Hide thinnest circle stroke.

hide thin circle again

Add another frame and then hide next stroked circle.

hide second circle again

Add another frame with duration 0.1 seconds. Hide the Tap layer group, and make a new frame. Reveal the big news section we made earlier in Section 1 Step 28 by setting its Opacity to 100%. Hide the small news grid by setting its Opacity to 0%.

show large story

Add tween animation between the current frame and the previous ones.

tween news story
finished full news story

This is what we have for this animation.

finished news animation

From Timeline panel, click Flatten Frames Into Layers.

flatten layers into frames

Each frame will be converted into a flat layer. If you have 33 frames, you will also get 33 flat layers: layer Frame 1 taken from content of frame 1, layer Frame 2 taken from frame 2, and so on.

new frames

Select all frame layers in Layers panel.

select all

Drag the layers onto the iPhone photo that you downloaded previously.

iphone pic

In Timeline panel, select Create Frame Animation and then click New Framebutton.

create frame animation

Make sure all layers are still selected. Hit Control-T to perform a transformation. Hold Control and then drag each corner and place them onto the screen corner.

place news animation into iPhone screen
fit edges
and again
and yet again
and now its good

Make a new frame for each layer. Put layer Frame 1 in the first frame, layer Frame 2in second frame, layer Frame 3 in third frame, and so on. You also want to match the duration for each of the frame. Make sure to set the loop to Forever, so the animation will keep on looping.

animate everything

Look at picture below for an example. Layer Frame 23 is revealed on frame 23. Layer Frame 25 is revealed on frame 25, and so on. Continue this for each frame.

keep animating

It’s time to export the result as animated GIF file. Select Save for Web in the File menu, and select GIF as file type. Play around with available settings to get the optimum file size. Test the animation result by clicking on the play button. Make sure to set its Looping Options to Forever.

save as gif

And that’s it: you’ve designed a demo app UI, animated it, and put the animation inside an iPhone picture to make the animation look like it’s running on a real device.


Reference: tutsplus