There is a CSS animation:

-webkit-animation: 0.1s tremor 1s ease-out infinite; 

How can I set the animation to run for 1 second and repeat every 5 seconds?

Animation:

 @-webkit-keyframes tremor { 0%, 25% { left: -1px; top:-1px; -webkit-transform: translateX(-4%); transform: translateX(-4%); } 50%, 100% { left: 1px; top: 1px; -webkit-transform: translateX(4%); transform: translateX(4%); } } 

    1 answer 1

    First, the animation must be written without a prefix. http://caniuse.com/#feat=css-animation

    Secondly, it is impossible to explicitly set the delay between repetitions. But it can be included in the frames themselves.

     // Сейчас у тебя что-то такое: 0% { color: red; } /* начало */ 100% { color: green; } /* 1s */ // Можно сделать так: 0% { color: red; } /* начало */ 16.777% { color: green; } /* 1s */ 100% { color: green; } /* 6s */ 
    • Start without prefixes, I just threw an example. So it is present in the code. I have an element that is animated, shaking. Attached the code in question. But how to register your version, I can not understand. - Frontender