×

CSS3:少年足球来一个!

作者:abc1232018.05.21来源:Web前端之家浏览:1253评论:0
关键词:css3足球
微信公众号

微信公众号

用CSS3画一个足球,一起来学习下吧,这个可以用来作为开场动画用,是个不错的选择哟!

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <title>CSS3:少年足球来一个!</title>
    </head>
    <style>
        .Loading{
            position: absolute;
            background-color: rgba(255,255,255,0.2);
            left:0;right:0;top:0;bottom: 0;
            width:100%;
            height:100%;
            display:flex;/*多轮布局*/
            align-items:center;/*垂直*/
            justify-content:center;/*水平*/
            z-index: 9999
        }
        .laodingCon{width:50px;height: 120px;}
        .ball {
            -webkit-animation: ball 300ms cubic-bezier(0.165, 0.840, 0.440, 1.000) infinite alternate;
            -ms-animation: ball 300ms cubic-bezier(0.165, 0.840, 0.440, 1.000) infinite alternate;
            -moz-animation: ball 300ms cubic-bezier(0.165, 0.840, 0.440, 1.000) infinite alternate;
            animation: ball 300ms cubic-bezier(0.165, 0.840, 0.440, 1.000) infinite alternate;
            height: 50px;
            width: 50px;
            background: url(http://www.njgep.com/images/loading-icon.png) no-repeat center;
            background-size: 100%
        }
        .ballshadow {
            -webkit-animation: shadow 300ms cubic-bezier(0.165, 0.840, 0.440, 1.000) infinite alternate;
            animation: shadow 300ms cubic-bezier(0.165, 0.840, 0.440, 1.000) infinite alternate;
            background: #000;
            bottom: -90px;
            height: 15px;
            width: 50px;
            -webkit-animation-delay: 0; animation-delay: 0;
            border-radius: 100%;
        }
        @-webkit-keyframes ball {
            0% {
                -webkit-transform: translateY( 0 );
                transform: translateY( 0 );
            }
            100% {
                -webkit-transform: translateY( -50px );
                transform: translateY( -50px );
            }
        }
        @keyframes ball {
            0% {
                -webkit-transform: translateY( 0 );
                transform: translateY( 0 );
            }
            100% {
                -webkit-transform: translateY( -50px );
                transform: translateY( -50px );
            }
        }

        @-webkit-keyframes shadow {
            0% {
                opacity: 0.2;
                -webkit-transform: scale( 0.3 );
                transform: scale( 0.3);
            }
            100% {
                opacity: 0.05;
                -webkit-transform: scale( 1 );
                transform: scale( 1 );
            }
        }
@keyframes shadow {
    0% {
        opacity: 0.2;
        -webkit-transform: scale( 0.3);
        transform: scale( 0.3);
    }
    100% {
        opacity: 0.05;
        -webkit-transform: scale( 1 );
        transform: scale( 1 );
    }
}
    </style>
    <body>
        <div id="_loading_page" class="Loading">
            <div class="laodingCon">
                <div class="ball"></div>
                <div class="ballshadow"></div>
            </div>
        </div>

    </body>
</html>
温馨提示:本文作者系 ,经Web前端之家编辑修改或补充,转载请注明出处和本文链接:
http://www.jiangweishan.com/article/football124129481208.html

网友评论文明上网理性发言 已有0人参与

发表评论:

最新留言

  • 访客

    代码不可以用...

  • asidl

    这个DEMO应该再细点更好。。。...

  • 今天头条

    文章不错非常喜欢...

  • admin

    可以交换链接~...

  • 周松松博客

    确实不会用...

  • 便宜vps

    https://www.yd631.com/(便宜vps)申请交换链接,不知可否?联系邮箱:...

  • 访客

    我是里奥梅西,现在荒的一逼!!!...

  • qlong

    mailAutoComplete插件好用。...

首页|JavaScript|HTML|HTML4|HTML5|CSS3|开发工具|性能优化|移动开发|前端教程|性能优化|开发工具|酷站欣赏|UI设计|前端教程

Copyright © 2013-2018 Web前端之家(www.jiangweishan.com) 版权所有 All Rights Reserved.
粤ICP备12067512号-1

Copyright Your WebSite.Some Rights Reserved.

Powered By Z-BlogPHP 1.5.2 Zero