gsap实现游乐场锤子砸下去动画效果代码

代码语言:html

所属分类:动画

代码描述:gsap实现游乐场锤子砸下去动画效果代码

代码标签: 锤子 下去 动画 效果

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

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

<head>

    <meta charset="UTF-8">





    <style>
        /* VARIABLES -  START */
        /* COLORS  */
        /* DIMENSIONS */
        /* FONTS */
        /* VARIABLES - END */
        /* COMMONS - START */
        .flex-center, .wrapper {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
        }

        * {
            box-sizing: border-box;
            margin: 0;
        }

        /* COMMONS - END */
        /* STYLES -  START */
        .wrapper {
            background-color: #1161ab;
        }
        .wrapper .play-stand {
            width: 110px;
            height: 400px;
        }
        .wrapper .play-stand .glass-enclosure {
            height: 300px;
            width: 80px;
            margin: 0 auto;
            border-left: 5px solid #a3b6c4;
            background-color: #fff;
            border-right: 5px solid #a3b6c4;
            padding-top: 10px;
        }
        .wrapper .play-stand .glass-enclosure .liquid-tube {
            width: 20px;
            border-radius: 20px 20px 0px 0px;
            height: 100%;
            margin: 0 auto;
            background-color: #56ebff;
            position: relative;
        }
        .wrapper .play-stand .glass-enclosure .liquid-tube .liquid-red {
            position: absolute;
            width: 10px;
            height: 40px;
            background-color: #e33130;
            bottom: 25px;
            left: 5px;
            border-radius: 10px 10px 0 0;
        }
        .wrapper .play-stand .glass-enclosure .liquid-tube .liquid-blue {
            position: absolute;
            width: 10px;
            height: 15px;
            background-color: #168ea1;
            bottom: 0;
            left: 5px;
        }
        .wrapper .play-stand .glass-enclosure .liquid-tube .red-knob {
            position: absolute;
            width: 50px;
            height: 25px;
            z-index: 10;
            background-color: #ff5958;
            bottom: 15px;
            left: -14px;
            border-radius: 50px 50px 0 0;
            cursor: pointer;
        }
        .wrapper .play-stand .glass-separator {
            width: 70px;
            height: 5px;
            background-color: rgba(163, 182, 196, 0.7);
            margin: 0 auto;
        }
        .wrapper .play-stand .glass-top {
            width: 80px;
            height: 35px;
            background-color: #fff;
            margin: 0 auto;
            border-left: 5px solid #a3b6c4;
            border-right: 5px solid #a3b6c4;
            border-top: 5px solid #a3b6c4;
            border-radius: 25px 25px 0 0;
        }
        .wrapper .play-stand .stand-foot-top {
            width: 100px;
            height: 20px;
            background-color: #a3b6c4;
            margin: 0 auto;
        }
        .wrapper .play-stand .stand-foot-shadow {
            margin: 0 auto;
            border-bottom: 5px solid #7195bb;
            border-left: 3px solid transparent;
            border-right: 3px solid transparent;
            height: 0;
            width: 105px;
        }
        .wrapper .play-stand .stand-foot-bottom {
            margin: 0 auto;
            background-color: #a3b6c4;
            height: 20px;
            width: 105px;
        }
        .wrapper .hammer {
            width: 100px;
            position: absolute;
        }
        .wrapper .hammer .head {
            width: 100px;
            height: 50px;
            background-color: #093c6e;
            position: relative;
            border-radius: 5px;
        }
        .wrapper .hammer .head:before {
            content: "";
            position: absolute;
            width: 5px;
            height: 50px;
            background-color: #fff;
            left: 10px;
        }
   .........完整代码请登录后点击上方下载按钮下载查看

网友评论0