CSS |填充-不透明度属性
填充-不透明度属性用于设置应用于形状的绘制服务器的不透明度。
语法:
fill-opacity: [0-1] | <percentage>
属性值:
-
Value between 0 and 1: It is used to set the opacity of the fill-in decimal values. The value 0 means that the fill is completely transparent and invisible. The value 1 means that the fill is fully opaque and visible. A decimal value between these two values would give a semi-transparent fill.
示例:
```html <!DOCTYPE html>
CSS | fill-opacity .opacity1 { / completely visible fill / fill-opacity: 1.0;fill: green; }
.opacity2 { fill-opacity: 0.5;
fill: green; }
.opacity3 { fill-opacity: 0.25;
fill: green; }
.opacity4 { / completely transparent fill / fill-opacity: 0;
fill: green; }
GeeksforGeeks
CSS | fill-opacity输出:
-
percentage: It is used to set the opacity of the fill in percentage values. A value of 0% means that the fill is completely transparent and invisible. A value of 100% means that the fill is fully opaque and visible. A percentage value between these two values would give a semi-transparent fill.
示例:
```html <!DOCTYPE html>
CSS | fill-opacity .opacity1 { / completely visible fill / fill-opacity: 100%;fill: green; }
.opacity2 { fill-opacity: 50%;
fill: green; }
.opacity3 { fill-opacity: 25%;
fill: green; }
.opacity4 { / completely transparent fill / fill-opacity: 0%;
fill: green; }
GeeksforGeeks
CSS | fill-opacity输出:
支持的浏览器:由填充不透明度属性支持的浏览器如下:
- 铬
- 火狐浏览器
- 旅行队
- 歌剧
- Internet Explorer 9
版权属于:月萌API www.moonapi.com,转载请注明出处