div+css实现logo开屏动画效果代码

代码语言:html

所属分类:动画

代码描述:div+css实现logo开屏动画效果代码

代码标签: div css logo 开屏 动画

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

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1">



    <style>
        body {
          background: #beeeef;
          overflow: hidden;
        }
        
        @keyframes camera {
          0%, 10%, 90%, 100% { transform: translate(-50%, -50%) perspective(1000px) rotateX(0deg); }
          20%, 80% { transform: translate(-50%, -50%) perspective(1000px) rotateX(80deg); }
        }
        
        @keyframes showShadow {
          0% { box-shadow: 0 0 0 0vmax #000; }
          100% { box-shadow: 0 0 0 100vmax #000; }
        }
        
        .splash {
          animation: 
            camera 7s forwards,
            showShadow 1s 7.2s linear forwards;
          font-size: 4vmin;
          width: 20em;
          height: 20em;
          position: absolute;
          top: 50%;
          left: 50%;
          transform-origin: 50% 100%;
          transform: translate(-50%, -50%) perspective(1000px) rotateX(80deg);
          transform-style: preserve-3d;
          background: black;
          background-repeat: none;
          box-shadow: 0 0 0 100vmax #0000;
        }
        
        @keyframes grow {
          0% { transform: translate(-50%, -50%) scale(0); }
          100% { transform: translate(-50%, -50%) scale(1); }
        }
        
        @keyframes write {
          0% { color: #0000; }
          100% { color: #f00; }
        }
        
        .splash::before {
          animation: 
            grow 0.3s 3.9s forwards,
            write 0.5s 6.5s forwards
            ;
          --color1: #fff;
          --color2: #000;
          content: "splash";
          color: #0000;
          position: absolute;
          top: 50%;
          left: 50%;
          font-size: 1.75em;
          width: 1em;
          height: 1em;
          transform: translate(-50%, -50%) scale(0);
          background: 
            repeating-conic-gradient(var(--color1) 0 3%, #0000 0 11%),
            repeating-conic-gradient(#0000 0 5%, var(--color1) 0 7%) 50% 50% / 60% 60%,
            repeating-conic-gradient(#0000 0 7%, var(--color1) 0 9%) 50% 50% / 70% 70%,
            repeating-conic-gradient(#0000 0 11%, var(--color1) 0 13%) 50% 50% / 8.........完整代码请登录后点击上方下载按钮下载查看

网友评论0