+ 2
How I can change the size of a circle whit hdml5??
draw circle html5
2 Answers
+ 1
The r attribute defines the radius of the circle.
SVG:
<svg height="100" width="100">
<circle cx="50" cy="50" r="40" fill="red" />
</svg>
Canvas:
var c = document.getElementById("myCanvas");
var ctx = c.getContext("2d");
ctx.beginPath();
ctx.arc(100, 100, 40, 0, 2 * Math.PI);
ctx.stroke();
+ 7
HTML/CSS also could be use to draw circles ;P
<div style="display inline-block; width:100px; height:100px; border-radius:50px; background:red;"></div>