千家信息网

怎么用css实现水纹扩散的动画效果

发表于:2025-11-15 作者:千家信息网编辑
千家信息网最后更新 2025年11月15日,小编给大家分享一下怎么用css实现水纹扩散的动画效果,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  

  css:

  .main{

  position:relative;

  height:70px;

  width:310px;

  margin:0auto;

  background-color:#f34147;

  }

  .circle{

  position:relative;

  float:left;

  height:70px;

  width:70px;

  }

  /*线*/

  .hr{

  position:relative;

  float:left;

  width:50px;

  height:70px;

  background:url("../images/hr_1.png")no-repeatcentercenter;

  background-size:auto18px;

  }

  .hr-x{

  background:url("../images/hr_2.png")no-repeatcentercenter;

  background-size:auto18px;

  }

  .hr-r{

  background:url("../images/hr_3.png")no-repeatcentercenter;

  background-size:auto18px;

  }

  /*按钮大:47小:39*/

  .box-icon{

  position:absolute;

  z-index:9999;

  top:0;

  right:0;

  left:0;;

  bottom:0;

  width:70px;

  height:70px;

  }

  /*小不亮*/

  .icon-a{

  background:url("../images/icon_a_3.png")no-repeatcentercenter;

  background-size:39px39px;

  }

  .icon-b{

  background:url("../images/icon_b_3.png")no-repeatcentercenter;

  background-size:39px39px;

  }

  .icon-c{

  background:url("../images/icon_c_3.png")no-repeatcentercenter;

  background-size:39px39px;

  }

  /*小亮*/

  .icon-a-1{

  background:url("../images/icon_a_2.png")no-repeatcentercenter;

  background-size:39px39px;

  }

  .icon-b-1{

  background:url("../images/icon_b_2.png")no-repeatcentercenter;

  background-size:39px39px;

  }

  .icon-c-1{

  background:url("../images/icon_c_2.png")no-repeatcentercenter;

  background-size:39px39px;

  }

  /*大亮*/

  .icon-a-2{

  background:url("../images/icon_a_1.png")no-repeatcentercenter;

  background-size:47px47px;

  }

  .icon-b-2{

  background:url("../images/icon_b_1.png")no-repeatcentercenter;

  background-size:47px47px;

  }

  .icon-c-2{

  background:url("../images/icon_c_1.png")no-repeatcentercenter;

  background-size:47px47px;

  }

  /*动效*/

  @keyframeswarn{

  0%{

  transform:scale(0.6);

  opacity:0;

  }

  25%{

  transform:scale(0.6);

  opacity:0.8;

  }

  /*50%{*/

  /*transform:scale(0.8);*/

  /*opacity:0.4;*/

  /*}*/

  /*75%{*/

  /*transform:scale(0.9);*/

  /*opacity:0.3;*/

  /*}*/

  100%{

  transform:scale(1);

  opacity:0.1;

  }

  }

  @-webkit-keyframeswarn{

  0%{

  -webkit-transform:scale(0);

  opacity:0;

  }

  25%{

  -webkit-transform:scale(0.6);

  opacity:0.8;

  }

  /*50%{*/

  /*-webkit-transform:scale(0.1);*/

  /*opacity:0.3;*/

  /*}*/

  /*75%{*/

  /*-webkit-transform:scale(0.5);*/

  /*opacity:0.5;*/

  /*}*/

  100%{

  -webkit-transform:scale(1);

  opacity:0.1;

  }

  }

  /*70*70的容器*/

  .box{

  position:absolute;

  width:70px;

  height:70px;

  border:6pxsolidrgba(225,225,225,0.5);

  -webkit-border-radius:70px;

  -moz-border-radius:70px;

  border-radius:70px;

  z-index:1;

  opacity:0;

  -webkit-animation:warn4sease-outinfinite;

  -moz-animation:warn4sease-outinfinite;

  animation:warn4sease-outinfinite;

  }

  .box-a{

  position:absolute;

  width:70px;

  height:70px;

  border:6pxsolidrgba(225,225,225,0.5);

  -webkit-border-radius:70px;

  -moz-border-radius:70px;

  border-radius:70px;

  z-index:1;

  opacity:0;

  -webkit-animation:warn4sease-outinfinite;

  -moz-animation:warn4sease-outinfinite;

  animation:warn4sease-outinfinite;

  animation-delay:1s;

  -webkit-animation-delay:1s;/*Safari和Chrome*/

  }

  .box-b{

  position:absolute;

  width:70px;

  height:70px;

  border:6pxsolidrgba(225,225,225,0.5);

  -webkit-border-radius:70px;

  -moz-border-radius:70px;

  border-radius:70px;

  z-index:1;

  opacity:0;

  -webkit-animation:warn4sease-outinfinite;

  -moz-animation:warn4sease-outinfinite;

  animation:warn4sease-outinfinite;

  animation-delay:2s;

  -webkit-animation-delay:2s;/*Safari和Chrome*/

  }

  .box-c{

  position:absolute;

  width:70px;

  height:70px;

  border:6pxsolidrgba(225,225,225,0.5);

  -webkit-border-radius:70px;

  -moz-border-radius:70px;

  border-radius:70px;

  z-index:1;

  opacity:0;

  -webkit-animation:warn4sease-outinfinite;

  -moz-animation:warn4sease-outinfinite;

  animation:warn4sease-outinfinite;

  animation-delay:3s;

  -webkit-animation-delay:3s;/*Safari和Chrome*/

  }

以上是"怎么用css实现水纹扩散的动画效果"这篇文章的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享的内容对大家有所帮助,如果还想学习更多知识,欢迎关注行业资讯频道!

很赞哦!
篇文章 动画 效果 内容 不怎么 大部分 容器 按钮 更多 知识 行业 资讯 资讯频道 频道 小亮 参考 学习 帮助 数据库的安全要保护哪些东西 数据库安全各自的含义是什么 生产安全数据库录入 数据库的安全性及管理 数据库安全策略包含哪些 海淀数据库安全审计系统 建立农村房屋安全信息数据库 易用的数据库客户端支持安全管理 连接数据库失败ssl安全错误 数据库的锁怎样保障安全 同花顺连接不了服务器什么问题 画网络安全手抄报简单好看字少 三级网络技术没过 松江区常规软件开发服务要求 太原市财贸学校网络技术 西宁网络安全实战特训营收费标准 一带一路数据库简介 数据库讲座 互联网 武汉科技大学 宁夏智能还款app软件开发 数据库查询两个条件语句 分销运营软件开发的意义 济南诚协网络技术有限公司 报表的数据库 面试怎么描述数据库的增删 为什么吃鸡显示服务器没有信号 淮安营销软件开发 软件开发人员的工作要求 局网络安全年度工作总结 网络安全实训专科 电动汽车整车控制器软件开发 数据库acess打折 曙光英雄连接不到服务器怎么办 江苏直销软件开发平台 软件开发测试发型圆脸 怀旧服服务器的几大主播 上海誉畅网络技术发展有限公司 神人斗地主软件开发 计算机网络技术教程化妆 128tick官方服务器
0