css实现一个中性泡泡机产生泡泡动画效果代码

代码语言:html

所属分类:动画

代码描述:css实现一个中性泡泡机产生泡泡动画效果代码

代码标签: 中性 泡泡机 产生 泡泡 动画 效果

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

<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="UTF-8">

    <link rel="apple-touch-icon" type="image/png" href="https://cpwebassets.codepen.io/assets/favicon/apple-touch-icon-5ae1a0698dcc2402e9712f7d01ed509a57814f994c660df9f7a952f3060705ee.png" />
    <meta name="apple-mobile-web-app-title" content="CodePen">

    <link rel="shortcut icon" type="image/x-icon" href="https://cpwebassets.codepen.io/assets/favicon/favicon-aec34940fbc1a6e787974dcd360f2c6b63348d4b1f4e06c77743096d55480f33.ico" />

    <link rel="mask-icon" type="" href="https://cpwebassets.codepen.io/assets/favicon/logo-pin-8f3771b1072e3c38bd662872f6b673a722f4b3ca2421637d5596661b4e2132cc.svg" color="#111" />


    <title>CodePen - Neuomorphism Trapped Animated Blob  V1.0</title>


    <link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css'>

    <style>
        *,
        *:before,
        *:after {
            -moz-box-sizing: border-box;
            -webkit-box-sizing: border-box;
            box-sizing: border-box;
        }

        body {
            margin: 0;
            background: #c9d1d1;
        }

        .frame {
            position: relative;
            width: 100px;
            height: 100px;
            border-radius: 23px;
            background: linear-gradient(145deg, #cacaca, #f0f0f0);
            margin: auto;
            left: 0;
            right: 0;
            top: 0.65em;
            bottom: 0;
            -webkit-transform-style: preserve-3d;
            -moz-transform-style: preserve-3d;
            -ms-transform-style: preserve-3d;
            -o-transform-style: preserve-3d;
            transform-style: preserve-3d;
            background-color: none;
            z-index: 5;
            overflow: hidden;
        }

        .outer-frame {
            position: absolute;
            width: 120px;
            height: 120px;
            border-radius: 23px;
            background: linear-gradient(145deg, #f0f0f0, #cacaca);
            box-shadow: 20px 20px 60px #9d9d9d, -20px -20px 60px #ffffff;
            margin: auto;
            left: 0em;
            right: 0;
            top: 45em;
            bottom: 0;
        }

        .circle {
            border-radius: 50%;
            border: 0.3em dashed #5cd6ff;
            height: 60px;
            width: 60px;
            margin: auto;
            position: absolute;
            left: 0;
            right: 0;
            top: 0;
            bottom: 0;
            z-index: 99;
            -webkit-animation: spin 3s linear infinite;
            -moz-animation: spin 3s linear infinite;
            animation: spin 3s linear infinite;
        }

@-webkit-keyframes spin {
            0% {
                transform: rotate(0deg);
            }
            100% {
                transform: rotate(360deg);
            }
        }
@-moz-keyframes spin {
            0% {
                transform: rotate(0deg);
            }
            100% {
                transform: rotate(360deg);
            }
        }
@keyframes spin {
            0% {
                transform: rotate(0deg);
            }
            100% {
                transform: rotate(360deg);
            }
        }
        .grid {
            border-radius: 25%;
            padding: 10px;
            width: 80px;
            height: 80px;
            background: #37505c;
            display: grid;
            grid-template-columns: auto auto auto;
            align-items: center;
            position: absolute;
            overflow: hidden;
            left: 0;
            right: 0;
            top: 0;
            bottom: 0;
            margin: auto;
        }

        .box {
            position: relative;
            margin: auto;
            left: 0;
            right: 0;
            top: 0;
            bottom: 0;
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: linear-gradient(145deg, #3b5662, #324853);
            box-shadow: 20px 20px 60px #273840, -20px -20px 60px #486878;
            overflow: hidden;
        }

        .outer-frame:hover .grid {
            background-color: #2e434d;
        }

        .outer-frame:hover .box {
            border-radius: 50%;
            background: linear-gradient(145deg, #68bce6, #7be0ff);
            box-shadow: 20px 20px 60px #5192b3, -20px -20px 60px #96ffff;
        }

        .outer-frame:hover .circle {
            opacity: 0;
        }

        .outer-cab {
            width: 500px;
            height: 500px;
            position: absolute;
            margin: auto;
            left: 0em;
            right: 0;
            top: 0em;
            bottom: 0;
            overflow: hidden;
            border-radius: 50px;
            background: linear-gradient(145deg, #cacaca, #f0f0f0);
            -webkit-transform-style: preserve-3d;
            -moz-transform-style: preserve-3d;
            -ms-transform-style: preserve-3d;
            -o-transform-style: preserve-3d;
            transform-style: preserve-3d;
            background: #e0e0e0;
            box-shadow: 20px 20px 60px #9d9d9d, -20px -20px 60px #ffffff;
        }

        .inner-cab {
            width: 470px;
            height: 470px;
            position: absolute;
            margin: auto;
            left: 0em;
            right: 0;
            top: 0em;
            bottom: 0;
            overflow: hidden;
            border-radius: 50px;
            background: linear-gradient(145deg, #cacaca, #f0f0f0);
            box-shadow: inset 20px 20px 60px #9d9d9d, -20px -20px 60px #ffffff;
            -webkit-transform-style: preserve-3d;
            -moz-transform-style: preserve-3d;
            -ms-transform-style: preserve-3d;
            -o-transform-style: preserve-3d;
            transform-style: preserve-3d;
        }

        .split-a {
            width: 600px;
            height: 10px;
            background: linear-gradient(145deg, #cacaca, #f0f0f0);
            box-shadow: 20px 20px 60px #9d9d9d, -20px -20px 60px #ffffff;
            -webkit-transform-style: preserve-3d;
            -moz-transform-style: preserve-3d;
            -ms-transform-style: preserve-3d;
            -o-transform-style: preserve-3d;
            transform-style: preserve-3d;
            position: absolute;
            left: -0.05em;
            right: 0;
            top: 14em;
            bottom: 0;
            z-index: 50;
        }

        .split-b {
            width: 600px;
            height: 10px;
            background: #fff;
            box-shadow: 20px 20px 60px #9d9d9d, -20px -20px 60px #ffffff;
            -webkit-transform-style: preserve-3d;
            -moz-transform-style: preserve-3d;
            -ms-transform-style: preserve-3d;
            -o-transform-style: preserve-3d;
            transform-style: preserve-3d;
            position: absolute;
            left: -0.05em;
            right: 0;
            top: 0.7em;
            bottom: 0;
            z-index: 50;
        }

        .shelf {
            width: 500px;
            height: 20px;
            background: linear-gradient(145deg, #cacaca, #f0f0f0);
            box-shadow: 20px 20px 60px #9d9d9d, -20px -20px 60px #ffffff;
            position: relative;
            left: 0em;
            right: 0;
            top: 25em;
            bottom: 0;
        }

        .........完整代码请登录后点击上方下载按钮下载查看

网友评论0