Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS animations on <span>

Tags:

html

css

I am trying to apply a CSS animation to a <span> element and I just can't get it to work. I can't find any resource that says whether animations can be applied to <span> elements. So, is it me that is making an error, or are spans animation immune?

Edit: Code

Inf<span class="inf_o">o</span>rmation
    <br>
do<span class="don_n">n</span>e
    <br>
we<span class="dbl_l">ll</span>

and css:

/* animations */
.inf_o 
{
  -webkit-animation-name: lower_head;
  -webkit-animation-duration: 3s;
  -webkit-animation-timing-function:ease-in;
  -webkit-animation-delay: 1s;
  -webkit-animation-play-state: active;  
}

@-webkit-keyframes lower_head
{
  from {margin-top:0px;}
  to {margin-top:10px;}
}
like image 272
providence Avatar asked Jul 30 '11 04:07

providence


1 Answers

just add display: inline-block;

like image 81
Leo Avatar answered Oct 19 '22 02:10

Leo