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>
相关推荐
Dxy123931021625 分钟前
Python检查JSON格式错误的多种方法
前端·python·json
chao-Cyril1 小时前
从入门到进阶:前端开发的成长之路与实战感悟
前端·javascript·vue.js
shalou29011 小时前
Spring 核心技术解析【纯干货版】- Ⅶ:Spring 切面编程模块 Spring-Instrument 模块精讲
前端·数据库·spring
大时光1 小时前
js 封装 动画效果
前端
大时光1 小时前
html翻页时钟 效果
前端
大猫子的技术日记1 小时前
2025 AI Agent 开发实战指南:从上下文工程到多智能体协作
前端·人工智能·bootstrap
前端达人1 小时前
被JavaScript忽视的Web Animations API:为什么说它是前端动画的真正未来?
开发语言·前端·javascript·ecmascript
忧郁的橙子.2 小时前
04-从零搭建本地AI对话系统:Ollama + DeepSeek-R1:7B + Streamlit
前端·chrome
PTC2 小时前
做了个 EPUB 阅读器,被「阅读进度同步」折磨了一周,总结 4 个血泪教训
前端
Aaron_Feng2 小时前
适配Swift 6 Sendable:用AALock优雅解决线程安全与不可变引用难题
前端