Play HTML5 (ii)----draw a simple picture on the canvas (HTML5 another powerful feature) with canvas script

Source: Internet
Author: User

Turn from: https://software.intel.com/zh-cn/blogs/2014/05/20/html5-canvas-html5/?utm_campaign=CSDN&utm_source= Intel.csdn.net&utm_medium=link&utm_content=%20others-%20canvas

The light rose that. In Tuesday, 20/05/2014-00:55 submitted

In the HTML5 can use the canvas tag on the canvas, first directly on the code, this article first briefly introduce the use of canvas, simple to draw a few circles, rectangles, triangles, writing.

The comments are given in the code, where it is particularly important to use canvas paint when you have to Beginpath and colsepath, but sometimes do not need to, in order to prevent problems, you can redraw a diagram each time you open the path, after the drawing closed the path.

The code is implemented on a Cheetah browser, and some browsers may not support it.[HTML]  View Plain copy   <! doctype html>   <meta charset= "Utf-8" >  

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.