纯css html 真实水滴效果

惯例,不多说直接上图

遵循开源精神,源码就直接放下面了,

html 复制代码
<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8" />
  <title>whater</title>
  <style>
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body {
      display: flex;
      justify-content: center;
      align-items: center;
      min-height: 100vh;
      background: #edeeed;
    }

    body>div {
      position: relative;
      display: flex;
      justify-content: center;
      align-items: center;
    }

    body>div>div {
      position: absolute;
      width: 150px;
      height: 150px;
      background: transparent;
      border-radius: 57% 43% 37% 63% / 45% 52% 48% 55%;
      box-shadow: inset 10px 10px 10px rgba(0, 0, 0, 0.05),
        15px 25px 10px rgba(0, 0, 0, 0.1), 15px 20px 20px rgba(0, 0, 0, 0.05),
        inset -10px -10px 15px rgba(255, 255, 255, 0.9);
    }

    body>div>div::before {
      content: "";
      position: absolute;
      top: 25px;
      left: 35px;
      background: #fff;
      width: 20px;
      height: 20px;
      border-radius: 42% 58% 37% 63% / 40% 43% 57% 60%;
    }

    body>div>div::after {
      content: "";
      position: absolute;
      top: 25px;
      left: 65px;
      background: #fff;
      width: 10px;
      height: 10px;
      border-radius: 57% 43% 37% 63% / 48% 37% 63% 52%;
    }

    body>div>div:nth-child(2) {
      transform: scale(0.5) translate(-200px, 180px);
      border-radius: 64% 36% 42% 58% / 42% 37% 63% 58%;
    }

    body>div>div:nth-child(3) {
      transform: scale(0.5) translate(280px, 10px);
      border-radius: 49% 51% 42% 58% / 56% 47% 53% 44%;
    }

    body>div>div:nth-child(4) {
      transform: scale(0.5) translate(120px, -350px);
      border-radius: 39% 61% 63% 37% / 77% 47% 53% 23%;
    }

    body>div>div:nth-child(5) {
      transform: scale(0.3) translate(20px, -350px);
      border-radius: 37% 63% 64% 36% / 53% 65% 35% 47%;
    }

    body>div>div:nth-child(6) {
      transform: scale(0.7) translate(-150px, -200px);
      border-radius: 37% 63% 64% 36% / 53% 65% 35% 47%;
    }

    body>div>div:nth-child(7) {
      transform: scale(0.4) translate(-400px, -100px);
      border-radius: 37% 63% 64% 36% / 53% 65% 35% 47%;
    }
  </style>
</head>

<body>
  <div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
  </div>
</body>

</html>
相关推荐
CoderLiu8 分钟前
用这个MCP,只给大模型一个figma链接就能直接导出图片,还能自动压缩上传?
前端·llm·mcp
伍哥的传说10 分钟前
鸿蒙系统(HarmonyOS)应用开发之实现电子签名效果
开发语言·前端·华为·harmonyos·鸿蒙·鸿蒙系统
海的诗篇_44 分钟前
前端开发面试题总结-原生小程序部分
前端·javascript·面试·小程序·vue·html
uncleTom6661 小时前
前端地图可视化的新宠儿:Cesium 地图封装实践
前端
lemonzoey1 小时前
无缝集成 gemini-cli 的 vscode 插件:shenma
前端·人工智能
老家的回忆1 小时前
jsPDF和html2canvas生成pdf,组件用的elementplus,亲测30多页,20s实现
前端·vue.js·pdf·html2canvas·jspdf
半点寒12W1 小时前
uniapp全局状态管理实现方案
前端
Vertira1 小时前
pdf 合并 python实现(已解决)
前端·python·pdf
牧杉-惊蛰1 小时前
uniapp微信小程序css中background-image失效问题
css·微信小程序·uni-app
PeterJXL2 小时前
Chrome 下载文件时总是提示“已阻止不安全的下载”的解决方案
前端·chrome·安全