How html5 draws rectangles
This article mainly shows you "html5 how to draw rectangles", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "html5 how to draw rectangles" this article.
The code is as follows:
HTML5 draws a rectangle http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js">$(document).ready(function(){var c=document.getElementById ("drawbox"); var draw=c.getContext ("2d"); / / to get a reference to the 2d content, call the drawing APIdraw.fillStyle= "# ff0000"; / / to specify the fill color draw.fillRect (0jue 0300100); / / coordinate and length and width draw.fillStyle= "rgba" / / method 2 RGB + Transparency draw.fillRect (400J0100100); / / coordinates and length and width}) these are all the contents of this article "how to draw rectangles in html5". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!