Commentaire: Partagez les codes de cercle simple dans HTML5, veuillez y consulter
<! Doctype html> <éad- head>
<Meta Charset = UTF-8>
<Title> Html5 Drawing Circle </Title>
<script src = "<a href =" http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js "> </ script"> "> </ script </ a>
</ head>
<cript>
$ (document) .ready (function () {
var c = document.getElementById ("Drawbox");
var draw = c.getContext ("2d"); // Obtenez une référence au contenu 2D et appelez l'API de dessin </p> <p> draw.fillStyle = "Red"; // Color
draw.beginpath (); // tire un nouveau
draw.arc (50,50,50,0, math.pi * 2, true); // Centre x coordonnée | coordonnée du centre Y
draw.closepath (); // fin
draw.fill ();
})
</cript>
</docy>
<lebvas> </ canvas>
</docy>
</html>
Diagramme de reproduction