超级css制作水滴入池效果

作者: 烟雨丿丶蓝 | 来源:发表于2018-03-01 14:04 被阅读57次
web前端群,189394454,有视频、源码、学习方法等大量干货分享

对于很多人来说css只是用来给网页上色的代码,其实css还是有很多很有趣的东西哦,除了用css来上色之外,还可以用css来写一些有趣的效果你就会发先css还是蛮有用的。
👇html代码:

<div class="drip"></div>

👇css代码:

  <style>
html, body {
  margin: 0;
  height: 100%;
  width: 100%;
  display: flex;
  background-color: #43A2CE;
}

.drip {
  width: 200px;
  height: 250px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: auto;
  position: relative;
}
.drip:before {
  position: absolute;
  left: 92.5px;
  top: 0;
  content: '';
  width: 15px;
  height: 15px;
  background-color: #FFF;
  border-radius: 50%;
  opacity: 0;
  animation: drip 4s ease infinite;
}
.drip:after {
  box-sizing: border-box;
  position: absolute;
  bottom: 0;
  left: 0;
  content: '';
  width: 0px;
  height: 0px;
  border: solid 4px #FFF;
  border-radius: 50%;
  opacity: 0;
  animation: splash 4s ease infinite;
}

@keyframes drip {
  10% {
    top: 0;
    opacity: 1;
    animation-timing-function: cubic-bezier(0.24, 0, 0.76, 0.14);
  }
  25% {
    opacity: 1;
    top: 200px;
    animation-timing-function: ease-out;
    width: 15px;
    height: 15px;
    left: 92.5px;
  }
  30% {
    opacity: 1;
    top: 160px;
    width: 5px;
    height: 5px;
    animation-timing-function: ease-in;
    left: 97.5px;
  }
  33% {
    top: 200px;
    opacity: 0;
    animation-timing-function: ease-out;
    left: 97.5px;
  }
  33.001% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
@keyframes splash {
  0% {
    opacity: 0;
  }
  25% {
    bottom: 50px;
    left: 100px;
    opacity: 0;
    width: 0px;
    height: 0px;
  }
  25.001% {
    opacity: 1;
  }
  33% {
    bottom: 0;
    left: 0;
    opacity: 0;
    width: 200px;
    height: 100px;
  }
  33.001% {
    bottom: 50px;
    left: 100px;
    opacity: 1;
    width: 0px;
    height: 0px;
  }
  43% {
    bottom: 0;
    left: 0;
    opacity: 0;
    width: 200px;
    height: 100px;
  }
  43.001% {
    opacity: 0;
  }
}

  </style>

相关文章

  • 超级css制作水滴入池效果

    对于很多人来说css只是用来给网页上色的代码,其实css还是有很多很有趣的东西哦,除了用css来上色之外,还可以用...

  • 2019-04-29

    基于CSS入门基础必备 CSS选择器的使用 CSS制作照片墙 效果显示:

  • 二十四、学成在线案例_banner部分

    效果 banner制作 代码 index.html index.css

  • 纯css3制作煽动翅膀的蝴蝶

    纯css3制作煽动翅膀的蝴蝶,先看效果 怎么样,效果还不错吧上代码: html css 在这之前介绍几个css属性...

  • Html5 实现 iOS 风格的 switch 开关效果(App

    首先,我所制作的开关效果是要放置于用 AppCan 制作的 App 中 效果图 Html代码: CSS代码: 最后...

  • 1217

    资源:css3制作工具css3按钮生成css3制作特殊效果-web前端实验室 浏览器的型号和css3前缀 五种主流...

  • CSS+HTML<水滴按钮效果>

    效果图: 它的优点:1.高效,性能不会差。2.体积小,用到项目中,你的文件大小增加了3-4k。3.容易使用,常用的...

  • 综合案例展示

    想做出效果如下的页面: html代码入下 CSS样式入下:

  • 关于一些CSS常用技巧吧

    1、使用CSS3 box-shadow制作同心圆: 最后的效果: 2、用HTML、CSS制作一个对话框尖角 首先理...

  • 第3章 CSS3边框-3

    3.3 CSS3图片边框属性 border-image效果在CSS2中,只有使用背景图片来制作,而且制作过程非常复...

网友评论

    本文标题:超级css制作水滴入池效果

    本文链接:https://www.haomeiwen.com/subject/mzpgxftx.html