0
我正在使用codepen使用的確切代碼,並且當我的圖像在我的視口中時,它們仍然不會消失。scrollReveal.js不工作
我沒有得到控制檯中的任何錯誤,所以我不知道爲什麼它會在codepen中完美工作,但不是當我嘗試去做。
HTML
<body>
<div class="wrap-games">
<div class="game"></div>
<div class="game"></div>
</div>
<div class="wrap-games">
<div class="game"></div>
<div class="game"></div>
</div>
<div class="wrap-games">
<div class="game"></div>
<div class="game"></div>
</div>
<div class="wrap-games">
<div class="game"></div>
<div class="game"></div>
</div>
<div class="wrap-games">
<div class="game"></div>
<div class="game"></div>
</div>
<div class="wrap-games">
<div class="game"></div>
<div class="game"></div>
</div>
<div class="wrap-games">
<div class="game"></div>
<div class="game"></div>
</div>
<div class="wrap-games">
<div class="game"></div>
<div class="game"></div>
</div>
<div class="wrap-games">
<div class="game"></div>
<div class="game"></div>
</div>
<div class="wrap-games">
<div class="game"></div>
<div class="game"></div>
</div>
<script src="https://cdn.jsdelivr.net/scrollreveal.js/3.0.9/scrollreveal.min.js"></script>
</body>
JS
$(document).ready(function() {
window.sr = ScrollReveal();
sr.reveal('.game');
});
也有一些基本的CSS ..