单击“播放转换”时,下面的示例将淡出图像。但我无法弄清楚如何淡化它?你能吗?
对jquery不感兴趣。
<style type="text/css">
#sample{
width: 960px;
height: 500px;
background-color: black;
}
</style>
<div id="sample">
<img id="image" src="day.png" /><br />
</div>
<a href="javascript:playtransition()">Play Transition</a>
<script type="text/javascript">
var image = document.getElementById("image");
function playtransition(){
image.style.MsFilter = "progid:DXImageTransform.Microsoft.Fade()";
image.style.filter = "progid:DXImageTransform.Microsoft.Fade()";
image.filters[0].play();
}
</script>