canvas实现可交互水墨风格树叶树木生长动画效果代码

代码语言:html

所属分类:动画

代码描述:canvas实现可交互水墨风格树叶树木生长动画效果代码

代码标签: canvas 交互 水墨 风格 树叶 树木 生长 动画

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

<!DOCTYPE html>
<html lang="en" >
<head>
  <meta charset="UTF-8">
<style>
    @import url(https://fonts.googleapis.com/css?family=Poiret+One);
html {
	overflow: hidden;
	touch-action: none;
	content-zooming: none;
}
body {
	position: absolute;
	margin: 0;
	padding: 0;
	background: #111;
	width: 100%;
	height: 100%;
}
#canvas {
	width: 100%; 
	height: 100%;
	background: #fff;
	position: absolute;
}
#text {
	position:absolute;
	left:0;
	bottom:10px;
	width:100%;
	pointer-events:  none;
}

#text div {
	position:absolute;
	color:#888;
	left:0;
	width:100%;
	text-align:center;
	top:-32px;
	font-family: 'Poiret One', cursive;
	font-size:32px;
}
</style>

</head>
<body>
<!-- partial:index.partial.html -->
<canvas id="canvas"></canvas>
<div id="text">
	<div id="clic" nowrap>this pen is mouse/touch interactive</div>
</div>
<!-- par.........完整代码请登录后点击上方下载按钮下载查看

网友评论0