css实现水滴效果图

效果图:

html 复制代码
<template>
  <div style="width: 100%;height:500px;padding:20px;">
    <div class="water"></div>
  </div>
</template>
<script>
export default {
  data() {
    return {};
  },
  watch: {},
  created() {},
  methods: {},
};
</script>
<style lang='less' scoped>
.water {
  width: 300px;
  height: 300px;
  box-shadow: 10px 20px 30px 0px rgba(0, 0, 0, 0.2) inset,
              10px 20px 30px rgba(0,0,0,0.3),
              15px 15px 30px rgba(0,0,0,0.05),
              -15px -15px 30px rgba(255,255,255,0.8) inset;
  border-radius: 59% 41% 71% 29% / 54% 43% 57% 46% ;
  margin: 0 auto;
  margin-top:300px;
  /**
  box-sizing 用于控制元素的盒模型,决定了元素的宽度和高度是如何计算的;
  默认值是content-box, 元素的宽度和高度只包含内容区域,
  border-box , 元素的宽度和高度包含内容区域,内边距,边框;
   */
  box-sizing: border-box;
  animation: action 3s linear infinite;
}
@keyframes action {
  0%{
    border-radius: 59% 41% 71% 29% / 54% 43% 57% 46% ;
  }
  25%{
    border-radius:43% 57% 55% 45% / 63% 37% 63% 37% ;
  }
  50%{

    border-radius:37% 63% 39% 61% / 69% 26% 74% 31% ;
  }
  75%{
    border-radius:53% 47% 44% 56% / 50% 58% 42% 50%  ;
  }
  100%{
    border-radius: 59% 41% 71% 29% / 54% 43% 57% 46% ;
  }
}
</style>
相关推荐
Quz4 小时前
QML与JavaScript 交互的四种方式
javascript·qt·交互
会周易的程序员4 小时前
cNetgate插件架构设计详解 动态库 脚本二开lua, python, javascript
javascript·c++·python·物联网·lua·iot
哆啦A梦15885 小时前
Vue3魔法手册 作者 张天禹 012_路由_(一)
前端·typescript·vue3
RaidenLiu5 小时前
别再手写 MethodChannel 了:Flutter Pigeon 工程级实践与架构设计
前端·flutter·前端框架
~央千澈~6 小时前
抖音弹幕游戏开发之第17集:添加日志系统·优雅草云桧·卓伊凡
linux·服务器·前端
JamesYoung79716 小时前
第一部分 — 基础知识 项目框架与文件布局
前端·chrome
孟健6 小时前
程序员就业率暴跌27.5%:我离开大厂5个月后,看懂了这件事
前端
卸任6 小时前
Electron判断是内置摄像头还是接摄像头
前端·react.js·electron
NEXT067 小时前
普通函数与箭头函数的区别
前端·javascript·面试
全马必破三7 小时前
Webpack知识点汇总
前端·webpack·node.js