Canvas 制作炫酷发光loading动画

 

<!DOCTYPE html>

<html >

<head>

  <meta charset="UTF-8">

  <title>Canvas 制作炫酷发光loading动画</title>

<meta name="keywords" content=" Canvas 制作炫酷发光loading动画" />

<meta name="description" content=" Canvas 制作炫酷发光loading动画" />

 

 

 

      <style>

      /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */

      body {

        background: #000;

}

 

img {

  display: block;

         float: left;

  margin: 0 1px 0 0;

}

 

canvas {

  background: #131c35 linear-gradient(#192853, #131c35);

         display: block;

  float: left;

}

    </style>

 

 

 

</head>

 

<body>

 

<canvas id="c"></canvas>

<script src="js/index.js"></script>

</body>

</html>

CSS部分:

body {

        background: #000;

}

 

img {

  display: block;

         float: left;

  margin: 0 1px 0 0;

}

 

canvas {

  background: #131c35 linear-gradient(#192853, #131c35);

         display: block;

  float: left;

 

  /* uncomment to test overlay */

 

  /*

  position: absolute;

  left: 0;

  opacity: .5;

  top: 0;

  */ 

 

}