js实现鼠标跟随canvas水墨画绘画动画效果代码
代码语言:html
所属分类:动画
代码描述:js实现鼠标跟随canvas水墨画绘画动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <style> 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> <canvas id="canvas"></canvas> <div id="text"> <div id="clic" nowrap> this pen is mouse/touch interactive </div> </div> <script> ! function () { "use strict"; // branch constructo.........完整代码请登录后点击上方下载按钮下载查看
网友评论0