纯css实现露珠水珠布局效果

代码语言:html

所属分类:布局界面

代码描述:纯css实现露珠水珠布局效果

代码标签: 露珠 水珠 布局 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">

    <style>
        /* I don't even know why I added sass */
        html, body {
            margin: 0;
            height: 100%;
            overflow: hidden;
        }

        .paper {
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            position: absolute;
        }
        .paper::before {
            content: '';
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            position: absolute;
            filter: url(#paper);
        }
        .paper::after {
            content: '';
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            position: absolute;
            background-image: linear-gradient(190deg, rgba(201, 201, 201, 0.1), rgba(85, 85, 85, 0.4));
        }

        .dropplets {
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            transform: rotateZ(8deg);
        }

        .dropplet {
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            position: absolute;
        }
        .dropplet:nth-child(1) {
            top: calc(50% - 130px);
            left: calc(50% + 110px);
        }
        .dropplet:nth-child(1)::after {
            content: '';
            top: -25px;
            left: -55px;
            position: absolute;
            width: 80px;
            height: 75px;
            border-radius: 50% 50% 50% 50% / 50% 50% 45% 45%;
            background-image: radial-gradient(ellipse atcenter, white 40%, transparent 60%);
            background-size: 10px 6px;
            background-position: 60% 25%;
            background-repeat: no-repeat;
            box-shadow: inset 14px 0px 5px -10px rgba(0, 0, 0, 0.2), inset 13px 0px 2px -10px rgba(0, 0, 0, 0.2), inset 0px -3px 5px 0px rgba(250, 241, 220, 0.5), inset 0px -20px 10px 1px rgba(255, 255, 255, 0.3), inset -20px 10px 5px -20px rgba(0, 0, 0, 0.3), inset -20px 15px 10px -20px rgba(0, 0, 0, 0.2), inset 0px 20px 30px -5px rgba(0, 0, 0, 0.3), 0px 2px 1px -1px rgba(245, 227, 183, 0.8), -16px 13px 5px -20px black, 17px 13px 5px -20px black, 15px 19px 5px -20px black, -2px 34px 1px -30px rgba(0, 0, 0, 0.4), -2px 35px 3px -30px rgba(255, 255, 255, 0.3), -1px 16px 3px -5px rgba(0, 0, 0, 0.5), -1px 21px 3px -5px rgba(0, 0, 0, 0.4), 1px -1px 5px 0px rgba(50, 50, 50, 0.5);
        }
        .dropplet:nth-child(1)::before {
            content: '';
            top: -25px;
            left: -55px;
            position: absolute;
            width: 80px;
            height: 75px;
            border-radius: 50% 50% 50% 50% / 50% 50% 45% 45%;
            background-color: red;
            filter: url(#water);
        }
        .dropplet:nth-child(2)::after {
            content: '';
            top: -25px;
            left: -55px;
            position: absolute;
            width: 100px;
            height: 80px;
            border-radius: 50% 50% 50% 50% / 45% 45% 55% 55%;
            background-image: radial-gradient(ellipse atcenter, rgba(0, 0, 0, 0.1) 0%, white 10%, white 40%, transparent 60%);
            background-size: 12px 8px;
            background-position: 60% 25%;
            background-repeat: no-repeat;
            box-shadow: inset 0px 1px 10px 0px rgba(0, 0, 0, 0.2), inset 14px 5px 2px -10px rgba(169, 168, 168, 0.7), inset 0px -3px 5px 0px rgba(250, 241, 220, 0.1), inset 0px -5px 20px 1px rgba(255, 255, 255, 0.1), inset -3px 3px 2px 0px rgba(169, 168, 168, 0.5), inset -23px 7px 2px -20px rgba(169, 168, 168, 0.3), inset -20px 15px 10px -20px rgba(0, 0, 0, 0.3), inset 0px 2px 1px 0px rgba(58, 2, 2, 0.3), inset 0px 30px 30px 0px rgba(0, 0, 0, 0.2), 0px 2px 1px -1px rgba(245, 227, 183, 0.6), 0px 4px 2px -1px rgba(131, 131, 131, 0.5), -20px -4px 5px -20px #666666, -22px 8px 5px -20px #666666, -20px 16px 5px -20px #666666, 17px 13px 5px -20px #666666, 15px 19px 5px -20px #6c6c6c, -1px 16px 3px -5px rgba(0, 0, 0, 0.5), -1px 21px 3px -5px rgba(0, 0, 0, 0.3), 0px 0px 2px 0px rgba(0, 0, 0, 0.1);
        }
        .dropplet:nth-child(2)::before {
            content: '';
            top: -25px;
            left: -55px;
            position: absolute;
            width: 100px;
            height: 80px;
            border-radius: 50% 50% 50% 50% / 45% 45% 55% 55%;
            background-color: red;
            filter: url(#water);
        }
        .dropplet:nth-child(3) {
            top: calc(50% + 120px);
            left: calc(50% - 80px);
        }
        .dropplet:nth-child(3)::after {
            content: '';
            top: -25px;
            left: -55px;
            position: absolute;
            width: 120px;
            height: 120px;
            border-radius: 90% 60% 100% 50% / 90% 50% 100% 45%;
            background-image: radial-gradient(ellipse atcenter, white 40%, transparent 60%);
            background-size: 10px 10px;
            background-position: 60% 25%;
            background-repeat: no-repeat;
            box-shadow: inset 13px -4px 4px -10px rgba(0, 0, 0, 0.4), inset 14px -4px 10px -10px rgba(0, 0, 0, 0.2), inset 0px -3px 10px 1px rgba(250, 241, 220, 0.8), inset 0px -15px 10px 0px rgba(0, 0, 0, 0.2), inset -20px 10px 5px -20px rgba(0, 0, 0, 0.2), inset -20px 15px 10px -20px rgba(0, 0, 0, 0.2), inset 0px 3px 2px 1px rgba(0, 0, 0, 0.2), inset 0px 30px 20px -5px rgba(0, 0, 0, 0.3), 0px 2px 1px -1px rgba(245, 227, 183, 0.8), -16px 13px 5px -20px black, 17px 13px 5px -20px black, 15px 19px 5px -20px black, -1px 16px 3px -5px rgba(0, 0, 0, 0.4), -1px 21px 3px -5px rgba(0, 0, 0, 0.3), 1px -1px 1px 0px rgba(50, 50, 50, 0.1);
        }
        .dropplet:nth-child(3)::before {
            content: '';
            top: -25px;
            left: -55px;
            position: absolute;
            width: 120px;
            height: 120px;
            border-radius: 90% 60% 100% 50% / 90% 50% 100% 45%;
            background-color: red;
            filter: url(#water);
        }
        .dropplet:nth-child(4) {
            top: calc(50% + 160px);
            left: calc(50% + 90px);
        }
        .dropplet:nth-child(4)::after {
            content: '';
            top: -25px;
            left: -55px;
            position: absolute;
            width: 60px;
            height: 60px;
            border-radius: 50%;
            background-image: radial-gradient(ellipse atcenter, white 30%, transparent 60%);
            background-size: 6px 6px;
            background-position: 60% 25%;
            background-repeat: no-repeat;
            box-shadow: inset 15px 0px 5px -10px rgba(0, 0, 0, 0.2), inset 13px 0px 2px -10px rgba(0, 0, 0, 0.2), inset 0px -3px 5px 0px rgba(250, 241, 220, 0.5), inset 0px -20px 10px 1px rgba(255, 255, 255, 0.3), inset -23px 10px 5px -20px rgba(0, 0, 0, 0.3), inset -20px 15px 10px -20px rgba(0, 0, 0, 0.2), inset 0px 25px 20px -5px rgba(0, 0, 0, 0.3), 0px 2px 1px -1px rgba(245, 227, 183, 0.8), -17px 10px 5px -20px black, 14px 20px 5px -20px black, 16px 14px 5px -20px black, -2px 27px 5px -20px rgba(255, 255, 255, 0.3), -1px 14px 3px -5px rgba(0, 0, 0, 0.5), -1px 18px 3px -5px rgba(0, 0, 0, 0.4), 0px -1px 5px 0px rgba(85, 85, 85, 0.5);
        }
        .dropplet:nth-child(4)::before {
            content: '';
            top: -25px;
            left: -55px;
            position: absolute;
            width: 60px;
            height: 60px;
            border-radius: 50%;
            background-color: red;
            filter: url(#water);
        }
        .dropplet:nth-child(5) {
            top: calc(50% - 180px);
            left: calc(50% - 30px);
        }
        .dropplet:nth-child(5)::after {
            content: '';
            top: -25px;
            left: -55px;
            position: absolute;
            width: 65px;
            height: 68px;
            border-radius: 50% 50% 50% 50% / 50% 50% 45% 45%;
            background-image: radial-gradient(ellipse atcenter, white 40%, transparent 60%);
            background-size: 10px 6px;.........完整代码请登录后点击上方下载按钮下载查看

网友评论0