单个div+css实现一个电吹风吹风机吹风动画效果代码

代码语言:html

所属分类:动画

代码描述:单个div+css实现一个电吹风吹风机吹风动画效果代码

代码标签: 单个 div css 电吹风 吹风机 动画

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

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">



    <style>
        body {
          display: grid;
          place-items: center;
          height: 100vh;
        }
        body:before {
          content: "";
          position: absolute;
          width: 300px;
          height: 60px;
          top: calc(50% - 140px);
          left: calc(50% + 140px);
          --w: 45px;
          --h: 15px;
          -webkit-mask: linear-gradient(to right, rgba(255, 255, 255, 0.001) 10px, #000 20px, #000, rgba(255, 255, 255, 0.001));
                  mask: linear-gradient(to right, rgba(255, 255, 255, 0.001) 10px, #000 20px, #000, rgba(255, 255, 255, 0.001));
          background: radial-gradient(ellipse at top, rgba(255, 255, 255, 0.001) 10px, #dce5e4 10px, #dce5e4 12px, rgba(255, 255, 255, 0.001) 12px) 50% 50%/var(--w) var(--h), radial-gradient(ellipse at bottom, rgba(255, 255, 255, 0.001) 10px, #dce5e4 10px, #dce5e4 12px, rgba(255, 255, 255, 0.001) 12px) calc(50% - 22.5px) 50%/var(--w) var(--h);
          z-index: 10;
          -webkit-animation: blowing 1s linear infinite, rotate 4s ease-in-out infinite alternate;
                  animation: blowing 1s linear infinite, rotate 4s ease-in-out infinite alternate;
          --position: 0px;
          --scale: 1;
          transform-origin: -200px calc(50% + 50px);
        }
        @-webkit-keyframes blowing {
          to {
            background-position: calc(50% + 266px) 50%, calc(50% - 22.5px + 266px) 50%;
          }
        }
        @keyframes blowing {
          to {
            background-position: calc(50% + 266px) 50%, calc(50% - 22.5px + 266px) 50%;
          }
        }
        body > div {
          position: relative;
          background: radial-gradient(circle at center, rgba(255, 255, 255, 0.001) 70px, #e4b951 70px, #b3871c 75px, #e4b951 90px, #e4b951 100px, #d4a021 125px, rgba(255, 255, 255, 0.001) 125px), repeating-radial-gradient(circle at center, #e4b951 4px, rgba(255, 255, 255, 0.001) 4px, rgba(255, 255, 255, 0.001) 10px, #e4b951 10px, #e4b951 14px) 50% 50%/160px 160px no-repeat, linear-gradient(15deg, rgba(255, 255, 255, 0.001) calc(50% - 2px), #e4b951 calc(50% - 2px), #e4b951 calc(50% + 2px), rgba(255, 255, 255, 0.001) calc(50% + 2px)) 50% 50%/160px 160px no-repeat, linear-gradient(30deg, rgba(255, 255, 255, 0.001) calc(50% - 2px), #e4b951 calc(50% - 2px), #e4b951 calc(50% + 2px), rgba(255, 255, 255, 0.001) calc(50% + 2px)) 50% 50%/160px 160px no-repeat, linear-gradient(45deg, rgba(255, 255, 255, 0.001) calc(50% - 2px), #e4b951 calc(50% - 2px), #e4b951 calc(50% + 2px), rgba(255, 255, 255, 0.001) calc(50% + 2px)) 50% 50%/160px 160px no-repeat, linear-gradient(60deg, rgba(255, 255, 255, 0.001) calc(50% - 2px), #e4b951 calc(50% - 2px), #e4b951 calc(50% + 2px), rgba(255, 255, 255, 0.001) calc(50% + 2px)) 50% 50%/160px 160px no-repeat, linear-gradient(75deg, rgba(255, 255, 255, 0.001) calc(50% - 2px), #e4b951 calc(50% - 2px), #e4b951 calc(50% + 2px), rgba(255, 255, 255, 0.001) calc(50% + 2px)) 50% 50%/160px 160px no-repeat, linear-gradient(90deg, rgba(255, 255, 255, 0.001) calc(50% - 2px), #e4b951 calc(50% - 2px), #e4b951 calc(50% + 2px), rgba(255, 255, 255, 0.001) calc(50% + 2px)) 50% 50%/160px 160px no-repeat, linear-gradient(105deg, rgba(255, 255, 255, 0.001) calc(50% - 2px), #e4b951 calc(50% - 2px), #e4b951 calc(50% + 2px), rgba(255, 255, 255, 0.001) calc(50% + 2px)) 50% 50%/160px 160px no-repeat, linear-gradient(120deg, rgba(255, 255, 255, 0.001) calc(50% - 2px), #e4b951 calc(50% - 2px), #e4b951 calc(50% + 2px), rgba(255, 255, 255, 0.001) calc(50% + 2px)) 50% 50%/160px 160px no-repeat, linear-gradient(135deg, rgba(255, 255, 255, 0.001) calc(50% - 2px), #e4b951 calc(50% - 2px), #e4b951 calc(50% + 2px), rgba(255, 255, 255, 0.001) calc(50% + 2px)) 50% 50%/160px 160px no-repeat, linear-gradient(150deg, rgba(255, 255, 255, 0.001) calc(50% - 2px), #e4b95.........完整代码请登录后点击上方下载按钮下载查看

网友评论0