在此滤镜中可以使用以下参数 -
参数
说明
不透明度
不透明度级别。 0 为完全透明,100 为完全不透明。
finishopacity
对象另一端的不透明度级别。
样式
形状不透明度渐变。0 = 均匀
1 = 线性
2 = 径向
3 = 矩形
startx
不透明度渐变开始的 x 坐标。
starty
不透明度渐变开始的 y 坐标。
完成
不透明度渐变结束的 x 坐标。
完成
不透明度渐变结束的 y 坐标。
示例您可以尝试运行以下代码来实现 alpha filter -
现场演示
<html> <head> </head> <body> <img src="/css/images/logo.png" alt="css logo" style="filter: alpha(opacity=100, finishopacity=0, style=2, startx=20, starty=40, finishx=0, finishy=0)" /> <p>text example:</p> <div style="width: 357; height: 50; font-size: 30pt; font-family: arial black; color: blue; filter: alpha(opacity=100, finishopacity=0, style=1, startx=0, starty=0, finishx=580, finishy=0)"> css tutorials </div> </body></html>
以上就是css alpha 通道滤镜的详细内容。
