css3 彩带扩散效果_【css3动画】圆波扩散效果

圆波扩散动画效果,就是一个圆由中心向四周循环扩散的动画效果。圆波扩散动画效果应用非常广泛,例如可以用来表示某一个位置的状态信息,在网页设计中,常常被用来作为登录或切换页面时的等待状态。如下图所示:

【css3动画】圆波扩散效果

本文将使用纯CSS3实现上图动画效果。

实例一:由实心圆点向四周扩散(有阴影)

css3动画圆波扩散效果

@keyframes warn {

0% {

transform: scale(0.3);

-webkit-transform: scale(0.3);

opacity: 0.0;

}

25% {

transform: scale(0.3);

-webkit-transform: scale(0.3);

opacity: 0.1;

}

50% {

transform: scale(0.5);

-webkit-transform: scale(0.5);

opacity: 0.3;

}

75% {

transform: scale(0.8);

-webkit-transform: scale(0.8);

opacity: 0.5;

}

100% {

transform: scale(1);

-webkit-transform: scale(1);

opacity: 0.0;

}

}

@keyframes warn1 {

0% {

transform: scale(0.3);

-webkit-transform: scale(0.3);

opacity: 0.0;

}

25% {

transform: scale(0.3);

-webkit-transform: scale(0.3);

opacity: 0.1;

}

50% {

transform: scale(0.3);

-webkit-transform: scale(0.3);

opacity: 0.3;

}

75% {

transform: scale(0.5);

-webkit-transform: scale(0.5);

opacity: 0.5;

}

100% {

transform: scale(0.8);

-webkit-transform: scale(0.8);

opacity: 0.0;

}

}

.container {

position: relative;

width: 120px;

height: 120px;

left: 10px;

top: 10px;

}

/* 保持大小不变的小圆点 */

.dot {

position: absolute;

width: 7px;

height: 7px;

left: 134px;

top: 134px;

-webkit-border-radius: 50%;

-moz-border-radius: 50%;

border: 1px solid #33ccff;

border-radius: 50%;

background-color:#33ccff; /* 实心圆 ,如果没有这个就是一个小圆圈 */

z-index: 2;

}

/* 产生动画(向外扩散变大)的圆圈 第一个圆 */

.pulse {

position: absolute;

width: 35px;

height: 35px;

left: 120px;

top: 120px;

border: 1px solid #3399ff;

-webkit-border-radius: 50%;

-moz-border-radius: 50%;

border-radius: 50%;

z-index: 1;

opacity: 0;

-webkit-animation: warn 2s ease-out;

-moz-animation: warn 2s ease-out;

animation: warn 2s ease-out;

-webkit-animatio

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值