🌈神奇的ScrollReveal.js

ScrollReveal is a JavaScript library for easily animating elements as they enter/leave the viewport.

ScrollReveal是一个JavaScript库,用于在元素进入/离开视口时轻松对其进行动画处理。

DEMO

<html>
    <head>
        <script src="https://unpkg.com/scrollreveal"></script>
    </head>
    <body>
        <h1 class="headline">
            Hello World🌎
        </h1>
        <script>
            ScrollReveal().reveal('.headline');
        </script>
    </body>
</html>