纯css实现涟漪动画效果

代码语言:html

所属分类:动画

代码描述:纯css实现涟漪动画效果

代码标签: 涟漪 动画 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">

<style>
@import url(https://fonts.googleapis.com/css?family=Norican);
html, body {margin:0;background:#45c2c5;}

div {
  display:block;
  position:absolute;
  top:50%;
  left:50%;
  margin:-20px 0 0 -20px;
  width:40px;
  line-height:40px;
}
h1 {
  font-size:50px;
  font-family: 'Norican', cursive;
  color:white;
  text-shadow:0 2px 0 #8ed2d4,2px 3px 15px rgba(0,0,0,0.5);
}
.ripple,.ripple:before,.ripple:after {
  display:block;
  border-radius:2px;
  width:2px;
  height:2px;
  -webkit-animation:rip 6s infinite ease-out;
  -moz-animation:rip 6s infinite ease-out;
}
.ripple {
  position:absolute;
  z-index:-1;
  top:40px;
  left:15px;
}
.ripple:before,.ripple:after {
  content:'';
  position:absolute;
}
.ripple:before {-webkit-animation-delay:.2s;-moz-animation-delay:.2s;top:5px;left:25px;}
.ripple:after {-webkit-animation-delay:.8s;-moz-animation-delay:.8s;top:25px;left:0;}
@-webkit-keyframes rip 
{
  0%  {
    box-shadow:0 0 0 0 transparent,
               0 0 0 0 transparent,
    .........完整代码请登录后点击上方下载按钮下载查看

网友评论0