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>
相关推荐
未来之窗软件服务几秒前
chrome webdrive异常处理-session not created falled opening key——仙盟创梦IDE
前端·人工智能·chrome·仙盟创梦ide·东方仙盟·数据调式
kymjs张涛几秒前
零一开源|前沿技术周报 #6
前端·ios·harmonyos
玲小珑4 分钟前
Next.js 教程系列(十)getStaticPaths 与动态路由的静态生成
前端·next.js
天天鸭10 分钟前
写个vite插件自动处理系统权限,降低99%重复工作
前端·javascript·vite
蓝婷儿14 分钟前
每天一个前端小知识 Day 23 - PWA 渐进式 Web 应用开发
前端
无奈何杨24 分钟前
CoolGuard风控中新增移动距离和移动速度指标
前端·后端
恋猫de小郭31 分钟前
Google I/O Extended :2025 Flutter 的现状与未来
android·前端·flutter
江城开朗的豌豆35 分钟前
Vue-router方法大全:让页面跳转随心所欲!
前端·javascript·vue.js
程序员爱钓鱼1 小时前
Go语言泛型-泛型约束与实践
前端·后端·go
前端小巷子1 小时前
web从输入网址到页面加载完成
前端·面试·浏览器