Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delay after each css animation

Tags:

css

animation

I used below css3 code to animate and rotate my logo 360 degree and its work currectly, how can I pause animation 2 second after every 360 degree rotation?

@keyframes logo {
   from {transform: rotateY(360deg);}
}
@-webkit-keyframes logo {
 from {-webkit-transform: rotateY(360deg);}
}
#logo:first-of-type{
width:120px;
-webkit-animation-name: logo;
-moz-animation-name: logo;
-o-animation-name: logo;
animation-name: logo;
animation:logo 3s infinite;
-webkit-animation:logo 3s infinite;
animation-duration:2s;
-webkit-animation-duration:2s;
animation-delay:2s;
-webkit-animation-delay:2s;
}
like image 727
H Emad Avatar asked Jan 18 '14 10:01

H Emad


People also ask

How do I add a delay between animations in CSS?

The CSS animation-delay property has the following syntax: animation-delay: [time] | initial | inherit; As you can see, there are three possible values: time, initial, and inherit. The first option is [time], which is the number of seconds or milliseconds before the animation starts.


1 Answers

you may include pause inside the animation itself :

@keyframes rotit {
  from {
    transform:rotatey(360deg);
  }
    66%, 100% {
      transform:rotatey(0deg);
    }

}

demo http://codepen.io/anon/pen/DmgcE

like image 146
G-Cyrillus Avatar answered Sep 30 '22 16:09

G-Cyrillus