我使用http://www.irunmywebsite.com/raphael/SVGTOHTML_LIVE90.php生成了一个 VML 文件。在 VML 文件中有一个回调函数部分用于确定事件:
function callback(member)
{
member.mouseover(function (e) { this.ofill=this.attr('fill');this.attr({fill:'#000000'}); });
member.mouseout(function (e) { this.attr({fill:this.ofill}); });
member.click(function (e) { var thisPath=this.attr('path');alert('You just clicked on Element #'+this.id+'.To help you find it in the code its path starts with......'+thisPath); });
}
如您所见,第一行填充了悬停在黑色上的 VML 形状。我想要做的是改变它的填充不透明度。
我试过了:
this.ofill=this.attr('fill');this.attr({fill-opacity:'#000000'});
和其他类似的变化没有成功。任何想法我需要在这里做什么?
谢谢