【发布时间】:2013-09-08 17:41:53
【问题描述】:
我试图弄清楚如何使用 JavaScript 在 Internet Explorer 8 中设置 v:roundrect VML 元素的不透明度。我尝试直接设置opacity 属性以及setAttribute 的属性,但都没有工作。我该怎么做?
【问题讨论】:
标签: internet-explorer internet-explorer-8 opacity vml
我试图弄清楚如何使用 JavaScript 在 Internet Explorer 8 中设置 v:roundrect VML 元素的不透明度。我尝试直接设置opacity 属性以及setAttribute 的属性,但都没有工作。我该怎么做?
【问题讨论】:
标签: internet-explorer internet-explorer-8 opacity vml
您是否尝试将v:fill 元素添加到v:roundrect 并设置opacity 属性?
var vfill = document.createElement("v:fill");
vfill.setAttribute("color",fillcolor);
vfill.setAttribute("opacity",fillopacity);
roundRect.appendChild(vfill);
【讨论】: