HTML5 achieves crystal clear raindrops Special Effects

Source: Internet
Author: User

Comments: The special effects of raindrops must have been seen by everyone. The special effects described in this article are implemented using HTML5. These effects are crystal clear and interesting. You can try to run them.
The Code is as follows:
<Html>
<Head>
<Title> effects of HTML5 raindrops </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 ();">

<Div id = "cholder">
<Canvas id = "canvas"> </canvas>
</Div>
</Body>
</Html>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.