CSS3特效之动画

     我们在工作中会遇到很多特效,很多情况下因为我们不是专业的美工所以就很难想到一些动画是怎样设计的,在这里小编给大家介绍一个网站https://daneden.github.io/animate.css/

   你在这里会看到很多的特效,

  

     点如进入github中,你就能看到下图

   

   然后打开里面就有动画的代码

     

 @-webkit-keyframes bounce {
            from, 20%, 53%, 80%, to {
                -webkit-animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
                animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
                -webkit-transform: translate3d(0,0,0);
                transform: translate3d(0,0,0);
            }

            40%, 43% {
                -webkit-animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
                animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
                -webkit-transform: translate3d(0, -30px, 0);
                transform: translate3d(0, -30px, 0);
            }

            70% {
                -webkit-animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
                animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
                -webkit-transform: translate3d(0, -15px, 0);
                transform: translate3d(0, -15px, 0);
            }

            90% {
                -webkit-transform: translate3d(0,-4px,0);
                transform: translate3d(0,-4px,0);
            }
        }
  然后在你的元素中使用animation:bounce 2s linear infinite,调用就可以了!

评论 14
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值