Fmdpa Posted June 9, 2010 Share Posted June 9, 2010 So in FF and Opera, the code is: document.getElementById("img").style.opacity="50" But what's the code for IE? Link to comment Share on other sites More sharing options...
Synook Posted June 9, 2010 Share Posted June 9, 2010 document.getElementById("img").style.filter = 'alpha(opacity=' + 0.5*100 + ')'; with some caveats, however: http://www.quirksmode.org/js/opacity.html.P.S. The CSS opacity property takes a value between 0 and 1. It's the IE filter that uses percentages. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.