I created a simple CSS animation. In the fiddle I believe all of the properties are correct but no animation is happening. Please help me understand what I am doing wrong. I am attaching some sample code and the jsfiddle below. Thanks.
@-moz-keyframes til {
0% { margin-top: -200px; }
20% { margin-top: -198px; }
35% { margin-top: -196px; }
50% { margin-top: -194px; }
75% { margin-top: -196px; }
80% { margin-top: -198px; }
100% { margin-top: -200px; }
}
@-o-keyframes til {
0% { margin-top: -200px; }
20% { margin-top: -198px; }
35% { margin-top: -196px; }
50% { margin-top: -194px; }
75% { margin-top: -196px; }
80% { margin-top: -198px; }
100% { margin-top: -200px; }
}
@keyframes til {
0% { margin-top: -200px; }
20% { margin-top: -198px; }
35% { margin-top: -196px; }
50% { margin-top: -194px; }
75% { margin-top: -196px; }
80% { margin-top: -198px; }
100% { margin-top: -200px; }
}
/*-------------------Animation Keyframes------------------------*/
.one {
z-index: 5;
-webkit-animation: til 2s ease-in infinite; /* Safari 4+ */
-moz-animation: til 2s ease-in infinite; /* Fx 5+ */
-o-animation: til 2s ease-in infinite; /* Opera 12+ */
animation: til 2s ease-in infinite; /* IE 10+ */
width: 100%;
height: 300px;
background: url(http://galnova.com/diabetescrush/img/mob/wave.png) no-repeat;
background-position: center;
margin-top: -200px;
}
Here is the fiddle. http://jsfiddle.net/galnova/pnk0j8gv/9/