2013-10-31 72 views
0

我使用http://www.irunmywebsite.com/raphael/SVGTOHTML_LIVE90.php生成了VML文件。在VML文件有一個回調函數部分,確定事件:Raphael填充不透明度在member.mouseover

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'}); 

並沒有成功其他類似的變化。任何想法我需要在這裏做什麼?

感謝

回答

0

無填充不透明度,VMLS,顯然。 IE8用戶只需要看VML的純色:P

0

你需要數不透明度不變色。

也許是這樣的:

this.ofill=this.attr('fill-opacity');this.attr({'fill-opacity':0.5}); 
+0

這是我嘗試的第一件事情之一。不起作用。我在想'這可能是罪魁禍首。 – symlink

+0

可能會有另一個變量,除了不透明度之外 – Brian