<HTML> <HEAD> <TITLE>淡入淡出</TITLE> <SCRIPT> <!-- function fadeOut(obj) { obj.style.filter="blendTrans(duration=2)"; if ((obj.visibility != "hidden") && (obj.filters.blendTrans.status != 2)) { obj.filters.blendTrans.Apply(); obj.style.visibility="hidden"; obj.filters.blendTrans.Play(); } } function fadeIn(obj) { obj.style.filter="blendTrans(duration=2)"; if ((obj.visibility != "visible") && (obj.filters.blendTrans.status != 2)) { obj.filters.blendTrans.Apply(); obj.style.visibility="visible"; obj.filters.blendTrans.Play(); } } --> </SCRIPT> </HEAD> <BODY> <IMG id=oImg src="/images/logo.gif"></IMG> <P> <BUTTON onclick="fadeOut(oImg)">Fade Image Out</BUTTON> <BUTTON onclick="fadeIn(oImg)">Fade Image In</BUTTON> </P> <HR> </BODY> </HTML>
CSS的blendtransp 淡入淡出应用代码,布布扣,bubuko.com
原文:http://www.cnblogs.com/youtianxia/p/3850191.html