<br><div class="msgheader"> <div class="right"><span style="CURSOR: pointer" onclick="copycode(getid('phpcode105'));"><u>复制代码</u></span></div>代码如下:</div> <div class="msgborder" id="phpcode105"> <br> <br> <br><title>HTML5雨滴特效</title> <br><style media="screen" type="text/css"> <br />img { display: none; } <br />body { overflow: hidden; } <br />#canvas { position: absolute; top: 0px; left: 0px; } <br /></style> <br><script src="/jscss/demoimg/201401/rainyday.js" type="text/javascript"></script> <br><script type="text/javascript"> <br />function demo() { <br />var engine = new RainyDay('canvas','demo1', window.innerWidth, window.innerHeight); <br />engine.gravity = engine.GRAVITY_NON_LINEAR; <br />engine.trail = engine.TRAIL_DROPS; <br />engine.rain([ <br />engine.preset(0, 2, 500) <br />]); <br />engine.rain([ <br />engine.preset(3, 3, 0.88), <br />engine.preset(5, 5, 0.9), <br />engine.preset(6, 2, 1), <br />], 100); <br />} <br /></script> <br> <br> <br><img id="demo1" src="/jscss/demoimg/201401/8390.jpg" alt="HTML5实现晶莹剔透的雨滴特效_html5教程技巧" > <br><div id="cholder"> <br><canvas id="canvas"></canvas> <br> </div> <br> <br> <br> </div>