.opacity{ filter:alpha(opacity=50); -moz-opacity:0.5; -khtml-opacity:0.5; opacity: 0.5; }
用javascript来设定一个元素为半透明:.object.filter = "alpha(opacity=" + opacity + ")"; .object.MozOpacity = (opacity / 100); .object.KhtmlOpacity = (opacity / 100); .object.opacity = (opacity / 100);