html5 canvas雨点打到窗玻璃动画

html5canvas雨点打到窗玻璃动画HTML5下雨效果效果预览:http://hovertree.com/texiao/html5/4.htm以下是代码:1234567HTML5

大家好,又见面了,我是全栈君,今天给大家准备了Idea注册码。

全栈程序员社区此处内容已经被作者隐藏,请输入验证码查看内容
验证码:
请关注本站微信公众号,回复“验证码”,获取验证码。在微信里搜索“全栈程序员社区”或者“www_javaforall_cn”或者微信扫描右侧二维码都可以关注本站微信公众号。

html5 canvas雨点打到窗玻璃动画

HTML5下雨效果

效果预览:http://hovertree.com/texiao/html5/4.htm

下雨

以下是代码:

 1 <!doctype html>
 2 <html lang="zh">
 3 <head>
 4 <meta charset="UTF-8">
 5 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
 6 <meta name="viewport" content="width=device-width, initial-scale=1.0">
 7 <title>HTML5 Canvas雨滴下落动画DEMO演示 - 何问起</title><base target="_blank" />
 8 <link rel="stylesheet" type="text/css" href="http://hovertree.com/texiao/html5/4/hovertreemalize.css" />
 9 <link rel="stylesheet" type="text/css" href="http://hovertree.com/texiao/html5/4/hovertreerain.css">
10 <style media="screen">
11 body {
12 overflow: hidden;
13 height: 100%;
14 margin: 0;
15 padding: 0;
16 }
17 
18 img {
19 width: 100%;
20 height: 100%;
21 }
22 </style>
23 
24 <script src="http://hovertree.com/texiao/html5/4/rainyday.min.js"></script>
25 <script>
26 function run() {
27 var image = document.getElementById('background');
28 image.onload = function() {
29 var engine = new RainyDay({
30 image: this
31 });
32 engine.rain([ [0, 2, 200], [3, 3, 1] ], 100);
33 };
34 image.crossOrigin = 'anonymous';
35 image.src = 'http://hovertree.com/texiao/html5/4/hovertree3.jpg';
36 }
37 </script>
38 
39 <!--[if IE]>
40 <script src="http://hovertree.com/texiao/html5/4/html5shiv.min.js"></script>
41 <![endif]-->
42 
43 </head>
44 <body onLoad="run();">
45 
46 <header class="htmleaf-header">
47 <div class="htmleaf-demo center">
48 <a href="http://hovertree.com">何问起</a>
49 <a href="http://www.baidu.com/baidu?word=%E5%A4%A9%E6%B0%94+&ie=utf-8&tn=bds&cl=3&ct=2097152&si=hovertree.com&s=hovertree.com" class="current">天气预报</a>
50 <a href="http://hovertree.com/texiao/">特效</a>
51 <a href="http://hovertree.com/hvtart/bjae/a6w6e2qg.htm">原文</a>
52 <br />下雨了,记得收衣服关窗户,出门带雨伞
53 </div>
54 </header>
55 
56 <img id="background" alt="background" src="" />
57 
58 </body>
59 </html>

天气预报

特效: http://www.cnblogs.com/roucheng/p/texiao.html

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/120691.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号