CSS仿真水滴

在这里插入图片描述

    <div class="water"></div>
    body {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100vh;
        background-color: deepskyblue;
    }
    .water {
        position: relative;
        width: 200px;
        height: 200px;
        box-shadow: 10px 15px 20px rgba(0, 0, 0, 0.3),
            15px 20px 30px rgba(0, 0, 0, 0.1), inset 15px 20px 25px rgba(0, 0, 0, 0.5), inset -15px -20px 25px rgba(225, 225, 225, 0.5);
        /*设计水滴圆角 https://9elements.github.io/fancy-border-radius/ */
        border-radius: 31% 69% 57% 43%/46% 26% 74% 54%;
        animation: action 10s linear infinite;
        &::after {
            content: "";
            position: absolute;
            height: 10px;
            width: 10px;
            top: 60px;
            left: 60px;
            background-color: rgba(225, 225, 225, 0.8);
            border-radius: 63% 37% 70% 30% / 52% 60% 40% 48%;
            box-shadow: 0px 0px 6px 6px rgba(225, 225, 225, 0.8);
        }
    }
    @keyframes action {
        25% {
            border-radius: 46% 54% 65% 35% / 32% 44% 56% 68%;
        }
        50% {
            border-radius: 55% 45% 49% 51% / 50% 28% 72% 50%;
        }
        75% {
            border-radius: 42% 58% 39% 61% / 35% 45% 55% 65%;
        }
        100% {
            border-radius: 52% 48% 57% 43% / 56% 48% 52% 44%;
        }
    }

相关推荐

  1. CSSCSS水平居中方案

    2024-05-15 13:16:09       38 阅读
  2. CSS水平垂直居中

    2024-05-15 13:16:09       55 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-05-15 13:16:09       106 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-05-15 13:16:09       116 阅读
  3. 在Django里面运行非项目文件

    2024-05-15 13:16:09       95 阅读
  4. Python语言-面向对象

    2024-05-15 13:16:09       103 阅读

热门阅读

  1. Spring Boot学习

    2024-05-15 13:16:09       32 阅读
  2. fastapi+vue实现导出功能

    2024-05-15 13:16:09       33 阅读
  3. 深入理解Qt的信号与槽机制

    2024-05-15 13:16:09       27 阅读
  4. Python3 笔记:range() 函数

    2024-05-15 13:16:09       30 阅读
  5. 【大数据面试题】27 讲下Doris的物化视图

    2024-05-15 13:16:09       36 阅读
  6. CentOS常用命令速览:把握Linux服务器的脉动

    2024-05-15 13:16:09       28 阅读
  7. Milvus 基本概念

    2024-05-15 13:16:09       30 阅读
  8. ListView[new]

    2024-05-15 13:16:09       34 阅读
  9. Linux监控apache脚本

    2024-05-15 13:16:09       33 阅读
  10. php8编译报错

    2024-05-15 13:16:09       38 阅读
  11. 自己设计扩散模型进行图生图

    2024-05-15 13:16:09       34 阅读