码迷,mamicode.com
首页 > Web开发 > 详细

animae.css动画 demo

时间:2018-10-09 18:08:02      阅读:246      评论:0      收藏:0      [点我收藏+]

标签:height   net   inf   style   box   styles   sde   mat   dcl   

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/animate.css@3.5.2/animate.min.css">
    <style>
            #box{
          width:200px;
          height: 200px;
          line-height: 200px;
          text-align: center;
          background-color: green;
          color: #fff;
          position: absolute;
          top: 500px;
      }
    </style>
</head>
<body>
    <body style="height:2000px;">
    <div id="box" class="animated infinite bounceOutLeft">春天来了</div>
    <script src="jquery.js"></script>
    <script>
        $(function () {
            $(document).scroll(function () {
                var scrollTop = $(this).scrollTop();
                console.log(scrollTop)
                if(scrollTop>400){
                    $("#box").addClass("animated slideInDown")

                }

            })



        })
    </script>
    </body>

</body>
</html>

 

animae.css动画 demo

标签:height   net   inf   style   box   styles   sde   mat   dcl   

原文地址:https://www.cnblogs.com/lxx7/p/9761598.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!