js实现乌云暴雨canvas动画效果
代码语言:html
所属分类:粒子
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
/********************
Common
********************/
html, body {
height: 100%;
width: 100%;
font-family: Helvetica, verdana, monospace;
color: #FFFFFF;
font-size: 100%;
background: #000000;
padding: 0;
margin: 0;
letter-spacing: 0.2rem;
overflow: hidden;
}
a {
color: #FFF;
text-decoration: none;
}
h1 {
font-size: 1.6rem;
}
p {
padding: 0.8rem 0;
font-size: 0.8rem;
}
div#main {
position: absolute;
top: 0;
left: 0;
padding: 1.6rem;
}
p#loading {
position: absolute;
bottom: 0;
right: 0;
padding: 1.6rem;
}
/********************
Contents
********************/
canvas#canvas {
background: #000000; /* fallback for old browsers */
background: -webkit-linear-gradient(to bottom, #434343, #000000); /* Chrome 10-25, Safari 5.1-6 */
background: linear-gradient(to bottom, #434343, #000000); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
}
div.controller {
position: absolute;
bottom: 0;
left: 0;
padding: 1.6rem
}
</style>
<script>
window.console = window.console || function(t) {};
</script>
<script>
if (document.location.search.match(/type=embed/gi)) {
window.parent.postMessage(&q.........完整代码请登录后点击上方下载按钮下载查看
网友评论0