animate.css动画示例demo集合代码

代码语言:html

所属分类:动画

代码描述:animate.css动画示例demo集合代码

代码标签: demo 集合

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">

    <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/animate.3.5.1.css">
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        ul {
            list-style-type: none;
        }
        body {
            font: 14px "Microsoft Yahei";
            overflow-x: hidden;
        }
        h1 {
            width: 900px;
            margin: 40px auto 100px;
            font: 32px "Microsoft Yahei";
            text-align: center;
        }
        h2 {
            font: 96px "Microsoft Yahei";
            font-weight: 500;
            text-align: center;
            color: #f326c5;
        }
        .wrap p {
            margin-bottom: 100px;
            font: 30px "Microsoft Yahei";
            text-align: center;
            color: #999;
        }
        .list {
            width: 1000px;
            margin: 0 auto;
        }
        dl {
            width: 1000px;
            margin: 10px auto;
            overflow: hidden;
        }
        dt {
            float: left;
            width: 1000px;
            padding: 5px 0;
            border-bottom: 1px solid #ddd;
            font-weight: 700;
        }
        dd {
            float: left;
            margin: 10px 10px 0 0;
            padding: 5px 10px;
            background-color: #eee;
            cursor: pointer;
        }

        .explain {
            display: none;
            margin-top: 20px;
            margin-bottom: 20px;
            font-size: 14px;
            text-align: center;
            color: #f50;
        }

        .tab {
            width: 900px;
            margin: 0 auto;
            border: 1px solid #ddd;
        }
        .tabNav {
            padding-bottom: 10px;
            overflow: hidden;
            zoom: 1;
            background-color: #f5f5f5;
        }
        .tabNav li {
            float: left;
            margin: 10px 0 0 10px;
            display: inline;
        }
        .tabNav a {
            float: left;
            padding: 5px 10px;
            color: #444;
            text-decoration: none;
        }
        .tabNav .active a {
            color: #fff;
            background-color: #f326c5;
        }

        .tabPane {
            display: none;
            overflow: hidden;
            zoom: 1;
        }
        .tabCnt .active {
            display: block;
        }
        .tabCnt {
            padding: 10px 20px 20px;
        }
        .tabPane li {
            float: left;
            margin: 10px 10px 0 0;
            padding: 5px 10px;
            background-color: #eee;
            cursor: pointer;
        }
        .tabPane .active {
            color: #f326c5;
        }
    </style>
    <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/jquery.17.js"></script>
    <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/jquery-migrate-1.2.1.min.js"></script>
    <script>
        $(function() {
            if ($.browser.msie && $.browser.version < 10) {
                $('.explain').show();
            }

            var $animate = $('#animate');
            var $btn = $('.tabCnt').find('li');
            $btn.click(function() {
                $(this).addClass('active').siblings().removeClass('active');
                $animate.removeClass().addClass($(this).text() + ' animated infinite');
                setTimeout(removeClass, 1000);
            });

            function removeClass() {
                $animate.removeClass();
            }

            var $tabNavItem = $('.tabNav').find('a');
            var $tabPane = $('.tabPane');
            $tabNavItem.each(function(i) {
                $(this).click(function() {
                    $(this).parent().addClass('active').siblings().removeClass('active');
                    $tabPane.eq(i).addClass('active').siblings().removeClass('active');
                    return false;
                });
            });
        });
    </script>
</head>

<body>
    <h1>Animate.css动画演示</h1>
    <div class="wrap">
        <h2 id="animate">Animate.css</h2>
        <p>
            V3.5.1——CSS3动画库
        </p>
    </div>

    <p class="explain">
        您的浏览器不支持 CSS3 animate 属性,所以您看不到任何效果,请使用 Firefox、Chrome 或 IE10
    </p>
    <div class="tab">
        <ul class="tabNav">
            <li class="active"><a>Attention Seekers</a></li>
            <li><a.........完整代码请登录后点击上方下载按钮下载查看

网友评论0