DIV CSS 佈局教程網

 DIV+CSS佈局教程網 >> 網頁腳本 >> HTML基礎知識 >> HTML5詳解 >> HTML5實現晶瑩剔透的雨滴特效
HTML5實現晶瑩剔透的雨滴特效
編輯:HTML5詳解     
復制代碼代碼如下:
<Html> 
<head> 
<title>Html5雨滴特效</title> 
<style media="screen" type="text/CSS"> 
img { display: none; } 
body { overflow: hidden; } 
#canvas { position: absolute; top: 0px; left: 0px; } 
</style> 
<script src="/JSCSS/demoimg/201401/rainyday.JS" type="text/Javascript"></script> 
<script type="text/Javascript"> 
function demo() { 
var engine = new RainyDay('canvas','demo1', window.innerWidth, window.innerHeight); 
engine.gravity = engine.GRAVITY_NON_LINEAR; 
engine.trail = engine.TRAIL_DROPS; 
engine.rain([ 
engine.preset(0, 2, 500) 
]); 
engine.rain([ 
engine.preset(3, 3, 0.88), 
engine.preset(5, 5, 0.9), 
engine.preset(6, 2, 1), 
], 100); 

</script> 
</head> 
<body onload="demo();"> 
<img id="demo1" src="/JSCSS/demoimg/201401/8390.jpg" /> 
<div id="cholder"> 
<canvas id="canvas"></canvas> 
</div> 
</body> 
</Html> 
XML學習教程| jQuery入門知識| AJAX入門| Dreamweaver教程| Fireworks入門知識| SEO技巧| SEO優化集錦|
Copyright © DIV+CSS佈局教程網 All Rights Reserved