凯尔特螺旋动画旋转效果

代码语言:html

所属分类:动画

代码描述:凯尔特螺旋动画旋转效果

代码标签: 旋转 效果

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

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">

<style>
body {
  background-color: #000;
  font-family: Arial, sans-serif;
}

canvas {
  display: block;
  margin: 0 auto;
  margin: calc(50vh - 240px) auto 0;
  background-color: #000;
}

p {
  text-align: center;
}
</style>

</head>
<body translate="no">
<canvas id="canvas">Su navegador no soporta canvas :( </canvas>

<script >
var canvas = document.getElementById("canvas");
var ctx = canvas.getContext("2d");
var cw = canvas.width = 500,
cx = cw / 2;
var ch = canvas.height = 500,
cy = ch / 2;
ctx.lineWidth = 2;
var rad = Math.PI / 180;
var frames = 0;
var points = [];
var a1 = -90 * rad;
var.........完整代码请登录后点击上方下载按钮下载查看

网友评论0