Why is my CSS3 animation not working? -


i have following css3 animation want in chrome: (fadein, , change text color). have div element class "divvy" , contains text "hello world". don't know whymy css is:

.fade-in {     opacity:0;     -webkit-animation:fadein ease-in 1;      -moz-animation:fadein ease-in 1;     animation:fadein ease-in 1;      -webkit-animation-fill-mode:forwards;       -moz-animation-fill-mode:forwards;     animation-fill-mode:forwards;      -webkit-animation-duration:0.3s;     -moz-animation-duration:0.3s;     animation-duration:0.3s;       -webkit-animation-delay: 0.5s;     -moz-animation-delay: 0.5s;     animation-delay: 0.5s;  }   @-webkit-keyframes example {     {color: black;}     {color: yellow;} }   @keyframes example {     {color: black;}     {color: yellow;} }  .divvy {     color: black;     -webkit-animation-delay: 1s;     -moz-animation-delay: 1s;     animation-delay: 1s;        -webkit-animation-name: example;            -webkit-animation-duration: 4s;       animation-name: example;       animation-duration: 6s; } 

html is:

<div class="divvy fade-in">hello world</div> 

the inclusion of webkit-animation-name appears make text disappear reason.

your code looks me. can run code below see working:

fade-in {      opacity:0;      -webkit-animation:fadein ease-in 1;       -moz-animation:fadein ease-in 1;      animation:fadein ease-in 1;        -webkit-animation-fill-mode:forwards;        -moz-animation-fill-mode:forwards;      animation-fill-mode:forwards;        -webkit-animation-duration:0.3s;      -moz-animation-duration:0.3s;      animation-duration:0.3s;          -webkit-animation-delay: 0.5s;      -moz-animation-delay: 0.5s;      animation-delay: 0.5s;    }      @-webkit-keyframes example {      {color: black; opacity:0;}      {color: yellow; opacity:1;}  }      @keyframes example {      {color: black; opacity:0;}      {color: yellow; opacity:1;}  }    .divvy {      color: black;      -webkit-animation-delay: 1s;      -moz-animation-delay: 1s;      animation-delay: 1s;          -webkit-animation-name: example;             -webkit-animation-duration: 4s;        animation-name: example;        animation-duration: 6s;  }
<div class="divvy fade-in">hello world</div>


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -