你的位置:首页 > 软件开发 > 网页设计 > How to create water Ripple effect using HTML5 canvas

How to create water Ripple effect using HTML5 canvas

发布时间:2015-11-27 22:00:10
https://www.script-tutorials.com/how-to-create-water-drops-effect-using-html5-canvas/https://www.script-tutorials.com/demos/97/index.htmlRai ...

https://www.script-tutorials.com/how-to-create-water-drops-effect-using-html5-canvas/

https://www.script-tutorials.com/demos/97/index.html

Rain & Water Effects(只在谷歌浏览器有效)

http://tympanus.net/Development/RainEffect/#slide-1

示例(http://tympanus.net/Development/RainEffect/)

源码(http://tympanus.net/Development/RainEffect/RainEffect.zip)

https://www.scirra.com/blog/125/internet-explorer-11-webgl-and-more

Step 1. HTML

As usual, we start with the HTML.

This is our main page code with all samples.

index.html

<!DOCTYPE html><html>  <head>    <meta charset=utf-8 />    <title>Water drops effect</title>    <link rel="stylesheet" href="css/main.css" type="text/css" />    <script src='/images/loading.gif' data-original="js/vector2d.js" type="text/javascript" charset="utf-8"></script>    <script src='/images/loading.gif' data-original="js/waterfall.js" type="text/javascript" charset="utf-8"></script>  </head>  <body>    <div >      <h3><a href="#">Water drops effect</a></h3>      <canvas id="water">HTML5 compliant browser required</canvas>      <div id="switcher">        <img onclick='watereff.changePicture(this.src);' src='/images/loading.gif' data-original="data_images/underwater1.jpg" />        <img onclick='watereff.changePicture(this.src);' src='/images/loading.gif' data-original="data_images/underwater2.jpg" />      </div>      <div id="fps"></div>    </div>  </body></html>

原标题:How to create water Ripple effect using HTML5 canvas

关键词:HTML

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。