js模拟彩虹变换色彩动画效果

代码语言:html

所属分类:动画

代码描述:js模拟彩虹变换色彩动画效果

代码标签: 变换 色彩 动画 效果

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

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

<style>
body{
	margin:0;overflow:hidden;
	font-family:sans-serif;
	font-weight:bold;
  color:#fff;
	background:#000;
}
#a{width:100vw;height:100vh;}
.settings{
	position: absolute;
	top:0; left:0;
	margin: 1em;
}

/* I wonder if that could be done in pure css, with something like
   radial-gradient background and a css animation? 

#a { display: none; }
body {
	width: 100vw; height: 100vh;
	animation: rainbow 5s linear infinite;
  background: radial-gradient(circle at 50% 50%, #f00, #ff0, #0f0, #0ff, #00f);	
}

@keyframes rainbow {

}

*/
</style>

</head>
<body translate="no">
<canvas id=a></canvas>
<div class=.........完整代码请登录后点击上方下载按钮下载查看

网友评论0