gsap拖动滑竿实现input烟花发射动画效果代码

代码语言:html

所属分类:动画

代码描述:gsap拖动滑竿实现input烟花发射动画效果代码

代码标签: gsap 拖动 滑竿 input 烟花 发射 动画

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

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <link href="https://fonts.googleapis.com/css2?family=Raleway:wght@200&display=swap" rel="stylesheet">





    <style>
        body {
          width: 100vw;
          overflow: hidden;
          touch-action: none;
          font-family: "Raleway", sans-serif;
        }
        
        input[type=range] {
          position: fixed;
          bottom: calc(10% + 12.5vh);
          left: 50%;
          transform: translateY(-100%);
          transform: translateX(-50%) rotate(90deg);
          width: 25vh;
          margin: 0;
        }
        
        p {
          position: fixed;
          bottom: calc(10% - 8vh);
          left: 50%;
          transform: translate(-50%, -50%);
          pointer-events: none;
        }
        
        container {
          position: fixed;
          bottom: calc(10% + 25vh);
          left: 50%;
          pointer-events: none;
        }
        container > * {
          position: absolute;
          top: 0;
          left: 0;
          transform: translate(-50%, -50%);
          opacity: 0;
          will-change: transform;
          backface-visibility: hidden;
        }
        
        @media (max-width: 400px) {
          input[type=range] {
            bottom: calc(20% + 12.5vh);
          }
        
          p {
            bottom: calc(20% - 8vh);
          }
        
          container {
            bottom: calc(20% + 25vh);
          }
        }
    </style>


</head>

<body>
    <input type="range" min="0" max="100" value="0">
    <p>Drag me ✨</p>
    <container>
        <input type="radio">
        <input type="radio">
        <input type="radio">
        <input type="radio">
        <input type="radio">
        <input type="radio" checked="true">
        <input type="radio" checked="true">
        <input type="radio" checked="true">
        <input type="radio" checked="true">
        <input type="radio" checked="true">
        <input type="checkbox">
        <input type="checkbox">
        <input type="checkbox">
        <input type="checkbox">
        <input type="checkbox">
        <input type="checkbox" checked="true">
        <input type="checkbox" checked="true">
        <input type="checkbox" checked="true">
        <input type="checkbox" checked="true">
        <input type="checkbox" checked="true">
        <input type="time">
        <input type="time">
        <input type="time">
        <input type="time">
        <input type="time">
        <input type="file">
        <input type="file">
        <input type="file">
        <input type="file">
        <input type="file">
        <input type="color" value="#d92626">
        <input type="color" value="#b5d926">
        <input type="color" value="#26d96e">
        <input type="color" value="#266ed9">
        <input type="color" value="#b526d9">
        <input type="radio">
        <input type="radio">
        <input type="radio">
        <input type="radio">
        <input type="radio">
        <input type="radio" checked=&qu.........完整代码请登录后点击上方下载按钮下载查看

网友评论0