- SVG 演示
- SVG - 加载器
- SVG - 对话框
- SVG - 图标
- SVG - 时钟
- SVG - 拖拽
- SVG - 关键点
- SVG - 地图
- SVG - amChart
- SVG - 图表
- SVG - 平坦表面阴影
- SVG - 图像滤镜
- SVG - 文本效果
- SVG - 带 CSS 效果的文本
- SVG - 箭头效果
- SVG - 品牌效果
- SVG - 果冻效果
- SVG - 渐变效果
- SVG - 活泼效果
- SVG - 滚动效果
- SVG - 幻灯片效果
- SVG - 标签效果
- SVG - Raphael.js 效果
- SVG - Velocity.js 效果
- SVG - Walkway.js 效果
- SVG - zPath.js 效果
- SVG - Vague.js 效果
- SVG - 变换效果
- SVG - 全屏叠加效果
- SVG - Lazylinepainter.js 效果
- SVG - 演示游戏
- SVG - 实时 SVG 广告
- SVG 有用资源
- SVG - 常见问题解答
- SVG - 快速指南
- SVG - 有用资源
- SVG - 讨论
SVG - 圆形
<circle> 元素用于绘制以中心点和给定半径为参数的圆形。
声明
以下是<circle>元素的语法声明。我们只展示了主要属性。
<circle cx="x-axis co-ordinate" cy="y-axis co-ordinate" r="length" > </circle>
属性
| 序号 | 名称及描述 |
|---|---|
| 1 | cx − 圆心在 x 轴上的坐标。默认为 0。 |
| 2 | cy − 圆心在 y 轴上的坐标。默认为 0。 |
| 3 | r − 圆的半径。 |
示例
testSVG.htm<html>
<title>SVG Circle</title>
<body>
<h1>Sample SVG Circle Image</h1>
<svg width="800" height="800">
<g>
<text x="0" y="15" fill="black" >Circle #1: Without opacity.</text>
<circle cx="100" cy="100" r="50" stroke="black"
stroke-width="3" fill="rgb(121,0,121)"></circle>
</g>
</svg>
</body>
</html>
输出
在 Chrome 浏览器中打开 textSVG.htm。您可以使用 Chrome/Firefox/Opera 直接查看 SVG 图像,无需任何插件。Internet Explorer 9 及更高版本也支持 SVG 图像渲染。
具有透明度的圆形
<html>
<title>SVG Circle</title>
<body>
<h1>Sample SVG Circle Image</h1>
<svg width="800" height="800">
<g>
<text x="0" y="15" fill="black" >Circle #2: With opacity </text>
<circle cx="100" cy="100" r="50"
style="fill:rgb(121,0,121);stroke-width:3;
stroke:rgb(0,0,0);stroke-opacity:0.5;opacity:0.5"> </circle>
</g>
</svg>
</body>
</html>
输出
在 Chrome 浏览器中打开 textSVG.htm。您可以使用 Chrome/Firefox/Opera 直接查看 SVG 图像,无需任何插件。Internet Explorer 9 及更高版本也支持 SVG 图像渲染。
svg_shapes.htm
广告