css+jquery实现宇宙天体运动背景效果代码

代码语言:html

所属分类:背景

代码描述:css+jquery实现宇宙天体运动背景效果代码

代码标签: css jquery 宇宙 天体 运动 背景

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

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

<head>
    <meta charset="UTF-8">

    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Raleway:100'>
    <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/reset.min.css">
    <style>
        @keyframes appearing {
      0% {
        transform: scale(0) translate(0px, 0px);
        opacity: 0;
      }
      70% {
        transform: scale(10) translate(50vw, 50vh);
        opacity: 1;
      }
      99% {
        transform: scale(0.1) translate(0px, 0px);
        opacity: 0.4;
      }
      100% {
        transform: scale(5) translate(0px, 0px);
        background-color: #fff !important;
        opacity: 1;
      }
    }
    @keyframes textColor {
      0% {
        color: #ff7043;
      }
      20% {
        color: #69f0ae;
      }
      40% {
        color: #40c4ff;
      }
      60% {
        color: #7c4dff;
      }
      80% {
        color: #f44336;
      }
      100% {
        color: #ff7043;
      }
    }
    body {
      overflow: hidden;
    }
    
    .game-area {
      background-color: #0F0F0F;
      background-image: url("//repo.bfw.wiki/bfwrepo/image/62f983b1ce43b.png");
      background-position: center;
      background-size: cover;
      background-blend-mode: color-dodge;
      width: 100%;
      height: 100vh;
      overflow: hidden;
    }
    .game-area .title {
      font-family: "Raleway", sans-serif;
      text-align: center;
      font-size: 4.4em;
      position: relative;
      top: 50%;
      transform: translateY(-50%);
      color: rgba(250, 250, 250, 0.3);
      transition: all 0.6s ease-in-out;
      text-shadow: 0 0 0px transparent;
      animation: title 10s ease-in-out infinite;
    }
    .game-area .title:hover {
      color: #fafafa;
      text-shadow: 0 0 10px #fff;
    }
    @keyframes title {
      0% {
        color: rgba(250, 250, 250, 0.3);
        text-shadow: 0 0 0px transparent;
      }
      50% {
        color: #fafafa;
        text-shadow: 0 0 10px #fff;
      }
      100% {
        color: rgba(250, 250, 250, 0.3);
        text-shadow: 0 0 0px transparent;
      }
    }
    .game-area .ball {
      position: absolute;
      width: 5px;
      height: 5px;
      background.........完整代码请登录后点击上方下载按钮下载查看

网友评论0