版权所有,禁止匿名转载;禁止商业使用。
“Alpha”滤镜可以用于调整对象的透明度,并且支持线性或放射性渐变的透明度。“Alpha”滤镜的CSS语法为:
filter:progid:DXImageTransform.Microsoft.Alpha(sProperties
下面是一个使用“Alpha”滤镜的简单示例
window.onload = function(){ $("hutia").onmousedown = setStartOpacityPoint; $("hutia").onmouseup = setEndOpacityPoint; } function setEndOpacityPoint(){ this.filters[0].finishX = parseInt((event.x- this.offsetLeft)/this.offsetWidth*100); this.filters[0].finishY = parseInt((event.y- this.offsetTop)/this.offsetHeight*100); this.filters[0].enabled = true; } function setStartOpacityPoint(){ this.filters[0].enabled = false; this.filters[0].startX = parseInt((event.x- this.offsetLeft)/this.offsetWidth*100); this.filters[0].startY = parseInt((event.y- this.offsetTop)/this.offsetHeight*100); } function $(str){ return(document.getElementById(str)); }