HTML5 Canvas Example

Source: Internet
Author: User

HTML 5 Canvas provides a way to draw graphics through JavaScript, which is easy to use but powerful. Each canvas element has a context (imagined as a page on the drawing board) in which any graphic can be drawn. Browsers support multiple canvas contexts and provide graphical rendering capabilities through different APIs .

Now let's take a look at the effect first!

The dark black part of the image above is the area where the mouse is located, and we can see the middle area darken. And the outside color turns green.

This one is the effect of the mouse moving somewhere else, and we can see clearly that the outside color has changed. It changes with the movement of the mouse color.

This is the HTML 5 canvas that we're going to talk about today.

This example previews the address: Http://html5demos.com/canvas-grad

(Only Safari, Firefox browser is supported.) Example code can be viewed from the browser to get the source code! )

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.