html水滴特效,纯css3水滴元素动画特效

使用方法:

1、head引入css文件

body {

background-color: #3498DB;

overflow: hidden;

}

div {

margin: 175px auto;

}

.drop {

position: relative;

width: 20px;

height: 20px;

top: -30px;

margin: 0 auto;

background: #FFF;

-moz-border-radius: 20px;

-webkit-border-radius: 20px;

border-radius: 20px;

-moz-animation-name: drip;

-webkit-animation-name: drip;

animation-name: drip;

-moz-animation-timing-function: cubic-bezier(1,0,.91,.19);

-webkit-animation-timing-function: cubic-bezier(1,0,.91,.19);

animation-timing-function: cubic-bezier(1,0,.91,.19);

-moz-animation-duration: 2s;

-webkit-animation-duration: 2s;

animation-duration: 2s;

-moz-animation-iteration-count: infinite;

-webkit-animation-iteration-count: infinite;

animation-iteration-count: infinite;

}

.drop:before {

content: "";

position: absolute;

width: 0;

height: 0;

border-left: 10px solid transparent;

border-right: 10px solid transparent;

border-bottom: 30px solid rgba(255,255,255,1);

top: -22px;

}

.wave {

position: relative;

opacity: 0;

top: 0;

width: 2px;

height: 1px;

border: #FFF 7px solid;

-moz-border-radius: 300px / 150px;

-webkit-border-radius: 300px / 150px;

border-radius: 300px / 150px;

-moz-animation-name: ripple;

-webkit-animation-name: ripple;

animation-name: ripple;

-moz-animation-delay: 2s;

-webkit-animation-delay: 2s;

animation-delay: 2s;

-moz-animation-duration: 2s;

-webkit-animation-duration: 2s;

animation-duration: 2s;

-moz-animation-iteration-count: infinite;

-webkit-animation-iteration-count: infinite;

animation-iteration-count: infinite;

}

.wave:after {

content: "";

position: absolute;

opacity: 0;

top: -5px;

left: -5px;

width: 2px;

height: 1px;

border: #FFF 5px solid;

-moz-border-radius: 300px / 150px;

-webkit-border-radius: 300px / 150px;

border-radius: 300px / 150px;

-moz-animation-name: ripple-2;

-webkit-animation-name: ripple-2;

animation-name: ripple-2;

-moz-animation-duration: 2s;

-webkit-animation-duration: 2s;

animation-duration: 2s;

-moz-animation-iteration-count: infinite;

-webkit-animation-iteration-count: infinite;

animation-iteration-count: infinite;

}

@keyframes ripple {

from {

opacity: 1;

}

to {

width: 600px;

height: 300px;

border-width: 1px;

top: -100px;

opacity: 0;

}

}

@keyframes ripple-2 {

0% {

opacity: 1;

}

50% {

opacity: 0;

}

100% {

width: 200px;

height: 100px;

border-width: 1px;

top: 100px;

left: 200px;

}

}

@keyframes drip {

to {

top: 190px;

}

}

2、body引入HTML代码

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值