zoukankan      html  css  js  c++  java
  • 入场样式

    <a href="#" class="animated">查看更多>></a>

    </script>
    <script>
    function ani(claname, type1, type2) {
    if(($("." + claname).offset().top - $(window).scrollTop()) < $(window).height()) {
    $("." + claname).find("img").eq(0).addClass(type1);
    $("." + claname).find("img").eq(1).addClass(type2);
    $("." + claname).find("img").eq(2).addClass(type2);
    };
    $(window).scroll(function() {
    if(($("." + claname).offset().top - $(window).scrollTop()) < $(window).height()) {
    $("." + claname).find("img").eq(0).addClass(type1);
    $("." + claname).find("img").eq(1).addClass(type2);
    $("." + claname).find("img").eq(2).addClass(type2);
    $("." + claname).find("h3").eq(0).addClass(type2);
    $("." + claname).find("p").eq(0).addClass(type2);
    $("." + claname).find("a").eq(0).addClass(type2);
    };
    });

    };

    ani("content_txt", "bounceInUp", "bounceInUp"); //从下往上
    ani("swiper-slide", "bounceInUp", "bounceInUp"); //从下往上
    ani("content_top", "bounceInUp", "bounceInUp"); //从下往上
    ani("content_c_c", "bounceInUp", "bounceInUp"); //从下往上
    ani("cet_top", "bounceInUp", "bounceInUp"); //从下往上
    ani("content_c_r", "bounceInRight", "bounceInLeft"); //从右往左
    ani("cet_cc_l", "bounceInLeft", "bounceInRight"); //从左往右
    ani("content_c_l", "bounceInLeft", "bounceInRight"); //从左往右
    ani("cet_cc_r_top", "bounceInRight", "bounceInLeft"); //从右往左
    ani("cet_cc_r_bott", "bounceInRight", "bounceInLeft"); //从右往左
    ani("cet_bott_l_top", "bounceInLeft", "bounceInRight"); //从左往右
    ani("cet_bott_l_bott", "bounceInLeft", "bounceInRight"); //从左往右
    ani("cet_bott_r", "bounceInRight", "bounceInLeft"); //从右往左
    ani("con_con_l", "bounceInRight", "bounceInLeft"); //从右往左
    ani("con_bott_r", "bounceInLeft", "bounceInRight"); //从左往右
    ani("cex_bott_bo", "bounceInUp", "bounceInUp"); //从下往上
    ani("con_con_r", "bounceInRight", "bounceInLeft"); //从右往左
    ani("con_bott_l", "bounceInLeft", "bounceInRight"); //从左往右
    ani("end", "fadeInDownBig", "fadeInDownBig") //从上往下
    </script>

    代码改变了我们,也改变了世界
  • 相关阅读:
    Redis使用详细教程
    Web API 强势入门指南
    log4net
    ASP.NET Web API——选择Web API还是WCF
    Hadoop RPC机制
    力扣算法:每日温度
    力扣算法:完全平方数
    力扣算法:岛屿数量
    面试总结二
    面试总结
  • 原文地址:https://www.cnblogs.com/wencaiguagua/p/13588222.html
Copyright © 2011-2022 走看看