+ 2

How I can change the size of a circle whit hdml5??

draw circle html5

17th Oct 2017, 3:49 PM
Luis Felipe De La Rosa Garcia
Luis Felipe De La Rosa Garcia - avatar
2 ответов
+ 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();
17th Oct 2017, 4:22 PM
Code-Bear
Code-Bear - avatar
+ 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>
18th Oct 2017, 9:49 AM
visph
visph - avatar