html涟漪动画效果,CSS3做涟漪的效果

涟漪的效果

@keyframes myfirst

{

from {border:0 solid #E4684D; left:1px;top: 1px;}

to {border:12px solid #E4684D; left:-11px;top: -11px;}

}

@-moz-keyframes myfirst

{

from {border:0 solid #E4684D; left:1px;top: 1px;}

to {border:12px solid #E4684D; left:-11px;top: -11px;}

}

@-webkit-keyframes myfirst

{

from {border:0 solid #E4684D; left:1px;top: 1px;}

to {border:12px solid #E4684D; left:-11px;top: -11px;opacity: 0;}

}

@-o-keyframes myfirst

{

from {border:0 solid #E4684D; left:1px;top: 1px;}

to {border:12px solid #E4684D; left:-11px;top: -11px;}

}

.box {

background-position: 0 0;

margin: 300px auto;

border-radius: 50%;

width: 86px;

height: 86px;

background: url(http://imgcache.qq.com/ac/www_tencent/join/images/icon_post.png) no-repeat 0 0;

position: relative;

/*#E4684D*/

}

.box:after {

content: "";

display: block;

height: 84px;

width: 84px;

border-radius: 84px;

position: absolute;

border:0 solid #E4684D;

left:-1px;

top: -1px;

opacity: 1;

}

.box:hover:after {

animation: myfirst 0.5s;

-moz-animation: myfirst 0.5s;

-webkit-animation: myfirst 0.5s;

-o-animation: myfirst 0.5s;

}

1.在after里面要定义好要改变的属性,在这里是border和left, top

2,在hover里面定义好引用的动画和时间

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值