【发布时间】:2012-07-21 04:45:50
【问题描述】:
我创建了一个定义图像不透明度的 Css 类,但我需要在 JavaScript 中访问它并在 for 循环中更改它,然后将新的不透明度传递回变量并重复该过程,直到获得不透明度想要100%。
我需要它由 onmouseover 事件处理程序触发。谁能给我一些代码,让我知道它是怎么做的?
我的外部样式表中的css:
.test{
opacity:0.4;
filter:alpha(opacity=40); /* For IE8 and earlier */
}
【问题讨论】:
标签: javascript image for-loop event-handling opacity