Get the App
SLTechnology News&Howtos  ›  Development  › 

How html5 draws rectangles

Shulou Source: shulou.com Published: 2022-06-01 07:27:21 11月14日 Update

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!

Tags: Rectangle content article coordinates method learning help code easy to understand more organization knowledge editing industry information information channel transparency channel color research Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia MariaDB Docker Microsoft OPPO Reno