gsap实现带声音的灯光开关效果代码

代码语言:html

所属分类:动画

代码描述:gsap实现带声音的灯光开关效果代码

代码标签: 声音 灯光 开关 效果

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

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

<head>

    <meta charset="UTF-8">


    <link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Inter:400,500,600,700&amp;display=swap'>

    <style>
        .switch {
            --c-background-top: #75757D;
            --c-background-bottom: #45454C;
            --c-background-top-shadow: rgba(255, 255, 255, .45);
            --c-background-bottom-shadow: rgba(0, 0, 0, .3);
            --c-stroke-top: #262626;
            --c-stroke-bottom: #3D3D43;
            --c-inner: #6D6D6D;
            --c-inner-top-shadow: rgba(0, 0, 0, .3);
            --c-inner-bottom-shadow: rgba(255, 255, 255, .18);
            --c-inner-inset-shadow: rgba(0, 0, 0, .14);
            --c-knob-stroke-top: #515151;
            --c-knob-stroke-bottom: #acacac;
            --c-knob-inner-top: #8A8A8A;
            --c-knob-inner-middle-top: #A1A1A1;
            --c-knob-inner-middle-bottom: #B4B4B4;
            --c-knob-inner-bottom: #BABABA;
            --c-knob-inner-shadow-top: rgba(255, 255, 255, .25);
            --c-knob-inner-shadow-bottom: rgba(0, 0, 0, .3);
            --c-knob-shadow-1: rgba(7, 7, 37, 0.16);
            --knob-inner-shadow-top-y: 2.5px;
            --knob-inner-shadow-bottom-y: -5.5px;
            --knob-shadow-1-y: 20px;
            --knob-shadow-1-blur: 20px;
            --knob-shadow-1-spread: 0;
            --knob-shadow-2-y: 12.5px;
            --knob-shadow-2-blur: 8.5px;
            --knob-shadow-3-y: 6.5px;
            --knob-shadow-3-blur: 4.5px;
            --knob-shadow-4-y: 4px;
            --knob-shadow-4-blur: 2.5px;
            --knob-shadow-7-y: 15px;
            --top-shadow-blur: 5px;
            --inner-bottom-shadow-blur: 1.25px;
            --shine-top-opacity: 0;
            --shine-top-y: -5px;
            --shine-bottom-opacity: 1;
            --shine-bottom-y: 0px;
            -webkit-appearance: none;
            -webkit-tap-highlight-color: transparent;
            border: none;
            background: none;
            padding: 0;
            margin: 0;
            outline: none;
            position: relative;
            cursor: pointer;
            border-radius: 36px;
            box-shadow: 0 4px 2.5px rgba(0, 0, 0, 0.0525), 0 8px 4.5px rgba(0, 0, 0, 0.065), 0 12px 8px rgba(0, 0, 0, 0.17), 0 22.5px 14.5px rgba(0, 0, 0, 0.07), 0 35px 25px rgba(0, 0, 0, 0.08), 0 20px 15px rgba(0, 0, 0, 0.05);
        }
        .switch.active {
            --c-background-top: #F0F0F0;
            --c-background-bottom: #E9E9E9;
            --c-background-top-shadow: #fff;
            --c-background-bottom-shadow: rgba(0, 0, 0, .18);
            --c-stroke-top: #E7E7E7;
            --c-stroke-bottom: #D0D0D0;
            --c-inner: #EAEAEA;
            --c-inner-top-shadow: rgba(156, 56, 0, 0.42);
            --c-inner-bottom-shadow: #FFF3E5;
            --c-inner-inset-shadow: rgba(0, 0, 0, .2);
            --c-knob-stroke-top: #cc4528;
            --c-knob-stroke-bottom: #f05f21;
            --c-knob-inner-top: #E94714;
            --c-knob-inner-middle-top: #E85617;
            --c-knob-inner-middle-bottom: #FF7324;
            --c-knob-inner-bott.........完整代码请登录后点击上方下载按钮下载查看

网友评论0