如何在 HTML 页面中绘制圆圈?
若要在 HTML 页面中绘制一个圆圈,可以使用 SVG 或画布。你还可以使用 CSS 绘制,方法是使用 border-radius 属性。
示例
你可以尝试运行以下代码来学习如何在 HTML 中绘制一个圆圈
<!DOCTYPE html> <html> <head> <style> #circle { width: 50px; height: 50px; -webkit-border-radius: 25px; -moz-border-radius: 25px; border-radius: 25px; background: blue; } </style> <head> <body> <div id="circle"></div> </body> </html>
广告