Comentario: HTML5 puede dibujar muchas formas. El siguiente es el código para dibujar rectángulos. Consulte ello.
<! DOCTYPE HTML> <HEAD>
<meta charset = utf-8>
<title> html5 dibujar rectángulo </title>
<script src = "<a href =" http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js "> </script"> "> </script </a >>
</ablo>
<script>
$ (documento) .Ready (function () {
var c = document.getElementById ("Drawbox");
var dibujo = c.getContext ("2d"); // Obtenga una referencia al contenido 2D y llame a la API de dibujo
draw.fillstyle = "#FF0000"; // El método 1 especifica el color de relleno
Draw.fillrect (0,0,300,100); // coordenadas y longitud y ancho
draw.fillStyle = "RGBA (0,0,255,0.5)"; // Método 2 RGB+Transparencia
Draw.fillrect (400,0,100,100); // coordenadas y longitud y ancho
})
</script>
</body>
<Canvas> </Canvas>
</body>
</html>
Diagrama de reproducción