Ich benutze animate.css, die schön und einfach ist, da ich ein Anfänger bin. Ich kann die Animation zum Laufen bringen und kann die Animation mit animation-duration: 3s
und animation-delay: 0s;
verzögern. Aber ich kann nicht finden, wie man es auslöst, wenn es in meinem Ansichtsfenster kommt, während ich hinunter scrolle. Hier ist der Code habe ich versucht, so weit:JavaScript: addClass, wenn Element im Ansichtsfenster mit animate.css ist
HTML
<div class="about-container">
<p>Content here...</p>
</div>
CSS
.about-container{
background-color: #a3c17f;
width: 500px;
height:500px;
margin: 0 auto;
}
JAVASCRIPT
$(function() {
if ($("#about-container").length > 0) {
addClass('animated pulse')
}
});
</script>
[Diese Antwort] (http://stackoverflow.com/a/29892258/2025923) könnte helfen/gib dir eine Idee. – Tushar
Dies funktioniert nicht für mich, ich frage mich, ob es, weil ich animate.css –
'über-container' verwende, ist Klasse oder ID ?? –