vue实现红绿灯灯光运动动画效果代码

代码语言:html

所属分类:动画

代码描述:vue实现红绿灯灯光运动动画效果代码

代码标签: 灯光 运动 动画 效果

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

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

<head>

    <meta charset="UTF-8">




    <style>
        html {
            height: 100%;
            display: -webkit-box;
            display: flex;
        }

        body {
            position: relative;
            margin: auto;
            background: #28303A;
        }

        .panel {
            width: 40vmin;
            height: 14vmin;
            background: #FEFFFE;
            border-radius: 2vw;
            position: relative;
            box-shadow: inset 0px 0px 0px 4px rgba(0, 0, 0, 0.1);
            -webkit-transform: rotate(90deg);
            transform: rotate(90deg);
            -webkit-transform-origin: 50% 50%;
            transform-origin: 50% 50%;
        }
        .panel:after {
            content: '';
            position: absolute;
            top: 50%;
            left: 100%;
            width: 70%;
            height: 20%;
            border-radius: 0 1vmin 1vmin 0;
            background: #15191F;
            -webkit-transform: translateY(-50%);
            transform: translateY(-50%);
        }
        .panel__input {
            opacity: 0;
        }

        .circles {
            width: calc(100% - 5vmin);
            height: 100%;
            margin: auto;
            display: -webkit-box;
            display: flex;
            position: relative;
            -webkit-box-pack: justify;
            justify-content: space-between;
            -webkit-box-align: center;
            align-items: center;
            -webkit-filter: url("#goo");
            filter: url("#goo");
        }
        .circles__element {
            width: 8vmin;
            height: 8vmin;
            display: -webkit-box;
            display: flex;
            -webkit-box-pack: center;
            justify-content: center;
            align-content: center;
            -webkit-box-align: center;
            align-items: center;
            background: #D6DAE7;
            border-radius: 50%;
            color: white;
            font-size: 1.5em;
            box-shadow: inset 4px 4px 0px 0px rgba(0, 0, 0, 0.1);
        }
        .circles__control {
            position: absolute;
            background: #FB5652;
            left: 0;
            -webkit-transform-origin: 50% 50%;
            transform-origin: 50% 50%;
        }

        .panel__input {
            -webkit-appearance: none;
            width: auto;
            background: transparent;
            position: absolute;
            width: 90%;
            top: 50%;
            left: 50%;
            -webkit-transform: translate(-50%, -50%);
            transform: translate(-50%, -50%);
            z-index: 2;
        }
        .panel__input:focus {
            outline: none;
        }
        .panel__input::-webkit-slider-runnable-track {
            width: auto;
            height: 8vmin;
            cursor: pointer;
            -webkit-animation: 0.2 s;
            animation: 0.2 s;
            border-radius: 0px;
            background: transparent;
        }
        .panel__input::-webkit-slider-thumb {
            width: 8vmin;
            height: 8vmin;
            cursor: pointer;
            border-radius: 100%;
            background: transparent;
            -webkit-transform: translateY(-50%);
            transform: translateY(-50%);
            -webkit-appearance: none;
        }
        .panel__input:focus::-webkit-slider-runnable-track {
            background: transparent;
        }
        .panel__input::-moz-range-track {
            width: auto;
            height: 8vmin;
            cursor: pointer;
            animation: 0.2 s;
            border-radius: 0px;
            background: transparent;
        }
        .panel__input::-moz-range-thumb {
            width: 8vmin;
            height: 8vmin;
            cursor: pointer;
            border-radius: 100%;
            background: transparent;
            transform: translateY(-50%);
        }
        .panel__input::-ms-track {
            width: auto;
            height: 8vmin;
            cursor: pointer;
            animation: 0.2 s;
            color: transparent;
            background: transparent;
        }
        .panel__input::-ms-fill-lower {
            border-radius: 0px;
            background: transparent;
        }
        .panel__input::-ms-fill-upper {
            border-radius: 0px;
            background: transparent;
        }
        .panel__input::-ms-thumb {
            width: 8vmin;
            height: 8vmin;
            cursor: pointer;
            border-radius: 100%;
            background: transparent;
            transform: translateY(-50%);
        }
        .panel__input:focus::-ms-fill-lower {
            background: transparent;
        }
        .panel__input:focus::-ms-fill-upper {
            background: transparent;
        }
    </style>



</head>

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

网友评论0