五彩斑斓的黑

DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>五彩斑斓黑title>
  <style>
    * {
      margin: 0;
      padding: 0;
    }
    .black {
      animation: move 0.5s ease infinite;
    }
    @keyframes move {
      0% {
        background: linear-gradient(0deg,#000d,#000d), linear-gradient(to right, #f001, #ff01,#0f01,#00f1,#f0f1,#f001);
      }
      20% {
        background: linear-gradient(0deg,#000d,#000d), linear-gradient(to right, #ff01,#0f01,#00f1,#f0f1,#f001,#ff01);
      }
      40% {
        background: linear-gradient(0deg,#000d,#000d), linear-gradient(to right, #0f01,#00f1,#f0f1,#f001,#ff01,#0f01);
      }
      60% {
        background: linear-gradient(0deg,#000d,#000d), linear-gradient(to right, #00f1,#f0f1,#f001,#ff01,#0f01,#00f1);
      }
      80% {
        background: linear-gradient(0deg,#000d,#000d), linear-gradient(to right, #f0f1,#f001,#ff01,#0f01,#00f1,#f0f1);
      }
      100% {
        background: linear-gradient(0deg,#000d,#000d), linear-gradient(to right, #f001, #ff01,#0f01,#00f1,#f0f1,#f001);
      }
    }

  style>
head>

<body>
  <div class="black" style="width: 100%; height: 100vh;">div>
body>

html>

你可能感兴趣的:(实例,css,css3,html)