0
アニメーション化したいという見出しがあります。私は、私が欲しいものを達成するために 'animated'と 'bounceInUp'というクラスを追加しています。しかし、何らかの理由で、アニメートしている要素が正しいアニメーションを実行していません。それらはすべてデフォルトで 'fadeIn'アニメーションになっています。エクスプレスとハンドルバーを使用してビューをレンダリングしています。このビューでは、jQueryを使用してビューを操作しています。ここに私の見解は以下のとおりです。animate.cssアニメーションのデフォルト設定がフェードイン
<div class='heading'>
<div class='container-fluid'>
<h1 class='cool-heading'>
<span>P</span>
<span>h</span>
<span>r</span>
<span>e</span>
<span>s</span>
<span>h</span>
<span>N</span>
<span>e</span>
<span>w</span>
<span>s</span>
</h1>
</div>
</div>
<div class='articles'>
<div class='articles-inner container'>
<!-- articles will go here -->
</div>
</div>
{{#each scripts}}
<script type="text/javascript" src="{{script}}"></script>
{{/each}}
、ここでは私のjsです:
$(document).ready(function(){
var count = 1;
$('.cool-heading').children('span').each(function(){
var delay = (count/($('.cool-heading').children('span').length)) + 's';
$(this).css({'-webkit-animation-delay': delay,'animation-delay': delay});
$(this).attr('class','animated bounceInUp');
count++;
});
});
誰もがその中にエラーを見つけることができる場合、私はまたmain.handlebarsレイアウトを持っている:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Mongo Scraper</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css">
<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script>
{{{body}}}
</body>
</html>