CSS 水波纹对号,错号

简介: CSS 水波纹对号,错号


<div class="ripple-right"></div>
<div class="ripple-error"></div>
* {
  padding:0;
  margin:0;
}
html {
  height:100%;
}
body {
  height:100%;
  background:#121212;
  display:flex;
  justify-content:space-around;
  align-items:center;
}
.ripple-right {
  position:relative;
  display:block;
  width:100px;
  height:100px;
  margin:160px auto;
  animation:ripple 0.6s linear infinite;
  border-radius:50px;
  background-color:#FFF;
}
.ripple-right::before,.ripple-right::after {
  content:"";
  position:absolute;
  width:0;
  height:6px;
  background:green;
  border-radius:3px;
  transform-origin:center left;
}
.ripple-right:before {
  transform:rotate(43deg);
  left:25px;
  bottom:49px;
  animation:right-before 500ms forwards alternate;
}
.ripple-right:after {
  left:44px;
  bottom:29px;
  transform:rotate(-50deg);
  animation:right-after 1s 500ms forwards alternate;
}
@keyframes right-before {
  0% {
  width:0;
}
100% {
  width:30px;
}
}@keyframes right-after {
  0% {
  width:0;
}
100% {
  width:50px;
}
}@keyframes ripple {
  0% {
  box-shadow:0 0 0 0 rgba(0,128,0,0.1),0 0 0 20px rgba(0,128,0,0.1),0 0 0 40px rgba(0,128,0,0.1),0 0 0 60px rgba(0,128,0,0.1);
}
100% {
  box-shadow:0 0 0 20px rgba(0,128,0,0.1),0 0 0 40px rgba(0,128,0,0.1),0 0 0 60px rgba(0,128,0,0.1),0 0 0 80px rgba(0,128,0,0);
}
}/*error*/
    .ripple-error {
  position:relative;
  display:block;
  width:100px;
  height:100px;
  margin:160px auto;
  animation:ripple-red 0.6s linear infinite;
  border-radius:50px;
  background-color:#FFF;
}
.ripple-error::before,.ripple-error::after {
  content:"";
  position:absolute;
  width:0;
  height:6px;
  background:#ff1c1c;
  border-radius:3px;
}
.ripple-error:before {
  transform:rotate(45deg);
  left:29px;
  top:27px;
  transform-origin:center left;
  animation:error 500ms ease-in forwards alternate;
}
.ripple-error:after {
  right:29px;
  top:27px;
  transform:rotate(-45deg);
  transform-origin:center right;
  animation:error 500ms ease-in 500ms forwards alternate;
}
@keyframes error {
  0% {
  width:0;
}
100% {
  width:60px;
}
}@keyframes ripple-red {
  0% {
  box-shadow:0 0 0 0 rgba(255,28,28,0.1),0 0 0 20px rgba(255,28,28,0.1),0 0 0 40px rgba(255,28,28,0.1),0 0 0 60px rgba(255,28,28,0.1);
}
100% {
  box-shadow:0 0 0 20px rgba(255,28,28,0.1),0 0 0 40px rgba(255,28,28,0.1),0 0 0 60px rgba(255,28,28,0.1),0 0 0 80px rgba(255,28,28,0);
}
}
目录
打赏
0
1
1
0
153
分享
相关文章
|
10月前
|
前端知识笔记(三十一)———css实现水波纹效果(水球图)
前端知识笔记(三十一)———css实现水波纹效果(水球图)
403 0
css实现的错号图标(3)
css实现的错号图标(3)
162 0
纯CSS实现水波纹效果
首先我们从结构和样式两个方面来讲解以上动图的实现过程
479 0
纯CSS实现水波纹效果
|
1月前
|
【2025优雅草开源计划进行中01】-针对web前端开发初学者使用-优雅草科技官网-纯静态页面html+css+JavaScript可直接下载使用-开源-首页为优雅草吴银满工程师原创-优雅草卓伊凡发布
【2025优雅草开源计划进行中01】-针对web前端开发初学者使用-优雅草科技官网-纯静态页面html+css+JavaScript可直接下载使用-开源-首页为优雅草吴银满工程师原创-优雅草卓伊凡发布
51 1
【2025优雅草开源计划进行中01】-针对web前端开发初学者使用-优雅草科技官网-纯静态页面html+css+JavaScript可直接下载使用-开源-首页为优雅草吴银满工程师原创-优雅草卓伊凡发布
【01】完成新年倒计时页面-蛇年新年快乐倒计时领取礼物放烟花html代码优雅草科技央千澈写采用html5+div+CSS+JavaScript-优雅草卓伊凡-做一条关于新年的代码分享给你们-为了C站的分拼一下子
【01】完成新年倒计时页面-蛇年新年快乐倒计时领取礼物放烟花html代码优雅草科技央千澈写采用html5+div+CSS+JavaScript-优雅草卓伊凡-做一条关于新年的代码分享给你们-为了C站的分拼一下子
153 21
【01】完成新年倒计时页面-蛇年新年快乐倒计时领取礼物放烟花html代码优雅草科技央千澈写采用html5+div+CSS+JavaScript-优雅草卓伊凡-做一条关于新年的代码分享给你们-为了C站的分拼一下子
【02】v1.0.1更新增加倒计时完成后的放烟花页面-优化播放器-优化结构目录-蛇年新年快乐倒计时领取礼物放烟花html代码优雅草科技央千澈写采用html5+div+CSS+JavaScript-优雅草卓伊凡-做一条关于新年的代码分享给你们-为了C站的分拼一下子
【02】v1.0.1更新增加倒计时完成后的放烟花页面-优化播放器-优化结构目录-蛇年新年快乐倒计时领取礼物放烟花html代码优雅草科技央千澈写采用html5+div+CSS+JavaScript-优雅草卓伊凡-做一条关于新年的代码分享给你们-为了C站的分拼一下子
67 14
【02】v1.0.1更新增加倒计时完成后的放烟花页面-优化播放器-优化结构目录-蛇年新年快乐倒计时领取礼物放烟花html代码优雅草科技央千澈写采用html5+div+CSS+JavaScript-优雅草卓伊凡-做一条关于新年的代码分享给你们-为了C站的分拼一下子
|
2月前
css3 svg制作404页面动画效果HTML源码
css3 svg制作404页面动画效果HTML源码
71 34
|
2月前
html+js+css实现的建筑方块立体数字时钟源码
html+js+css实现的建筑方块立体数字时钟源码
104 33
AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等