SVG参考手册
属性 | Attributes
fill-opacity
该属性指定颜色或当前对象所填充的内容的不透明度。
用法上下文
Categories |
Presentation attribute |
---|---|
Value |
<opacity-value> | inherit |
Initial value |
1 |
Animatable |
Yes |
Normative document |
SVG 1.1 (2nd Edition) |
实例
SVG
<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
<circle cx="100" cy="100" r="100" />
</svg>
<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
<circle cx="100" cy="100" r="100" fill-opacity="0.25" />
</svg>
结果
适用元素
以下元素可以使用该fill-opacity
属性:
- 形状元素»
- 文本内容元素»