Ich möchte diesen Text alle 5 Sekunden schütteln, also habe ich versucht, eine Animation in CSS zu implementieren und ein Intervall über jQuery, aber es scheint etwas ist falsch ... und Ideen, was fehlt ? Hier ist eine Geige: https://jsfiddle.net/s909gu2s/1/Run Animation alle 5 Sekunden/Intervall
.shk {
transform: translate3d(0, 0, 0);
backface-visibility: hidden;
-webkit-animation-name: shake;
-webkit-animation-duration: 1s;
-webkit-animation-iteration-count: infinite;
-webkit-animation-timing-function: linear;
-webkit-animation-delay: 0s;
}
@keyframes shakeMe {
10%, 90% {
transform: translate3d(-5px, 0, 0);
}
20%, 80% {
transform: translate3d(5px, 0, 0);
}
30%, 50%, 70% {
transform: translate3d(-5px, 0, 0);
}
40%, 60% {
transform: translate3d(5px, 0, 0);
}
}
$(document).ready(function() {
setInterval(function() {
$(".shk").css("animation", "shakeMe");
}, 500);
});
<div class="shk">Shake me</div>
Mögliche Duplikat [CSS wackeln/schütteln Effekt] (https://stackoverflow.com/questions/38132700/css-wiggle-shake-effect) –