Home > Web Front-end > H5 Tutorial > body text

HTML5 how to draw a rectangle with color and transparency for shape diagram_html5 tutorial tips

WBOY
Release: 2016-05-16 15:47:31
Original
2003 people have browsed it
1. Customize brush style

If you want to add color to the shape map, you need to use the following two important attributes.

fillStyle: Set the default color for all fill operations.
strokeStyle: Set the default color for all stroke operations.

2. Draw a rectangle with color and transparency

Copy code
The code is as follows:





HTML5





Tip: Your browser The device does not support the tag




3. Drawing effect
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template