css实现彩虹扇子折叠打开三维动画效果代码

代码语言:html

所属分类:动画

代码描述:css实现彩虹扇子折叠打开三维动画效果代码

代码标签: css 彩虹 折叠 打开

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

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">





    <style>
        @import url("https://fonts.googleapis.com/css2?family=Birthstone&display=swap");
        *, *::before, *::after {
          padding: 0;
          margin: 0 auto;
          box-sizing: border-box;
        }
        
        body {
          font-family: "Birthstone", cursive;
          background-color: #111;
          color: #fff;
          min-height: 100vh;
          display: grid;
          place-items: center;
          perspective: 750px;
          overflow: hidden;
        }
        body *:not(:empty) {
          transform-style: preserve-3d;
        }
        
        input#fan {
          -webkit-appearance: none;
             -moz-appearance: none;
                  appearance: none;
          position: fixed;
        }
        input#fan:checked + .scene > .fan > .fan_leaf {
          --rz: 0deg;
          --ry: 0deg;
          --ty: 0em;
        }
        input#fan:checked + .scene > p {
          --op: 1;
        }
        
        .scene {
          position: relative;
        }
        
        .fan {
          position: absolute;
          width: 1em;
          height: 5em;
          cursor: pointer;
          font-size: 50px;
          -webkit-animation: fanRotate 24s infinite linear;
                  animation: fanRotate 24s infinite linear;
        }
        @-webkit-keyframes fanRotate {
          from {
            transform: translate(-50%, -50%) ro.........完整代码请登录后点击上方下载按钮下载查看

网友评论0