As mentioned in other answers, you can use DHMTL behavior to apply any style specified in your stylesheet to your VML element, as the behavior from IE5 to IE9 is supported.
Start by creating an HTC file, for example: vmlcss.htc:
<PUBLIC:COMPONENT>
<PUBLIC:ATTACH EVENT="onpropertychange" ONEVENT="onpropertychange()" />
<PUBLIC:METHOD NAME="refresh" />
<SCRIPT LANGUAGE="JScript">
function onpropertychange()
{
if (event.propertyName == "className")
{
refresh();
}
}
function refresh()
{
element.fillcolor = element.currentStyle["fillcolor"];
element.strokecolor = element.currentStyle["strokecolor"];
}
refresh();
</SCRIPT>
</PUBLIC:COMPONENT>
Then apply it to your VML elements. For your specific example, you will use:
<style>
v\:path
{
behavior: url(vmlcss.htc);
}
</style>
, , :
.myRedPath
{
fillcolor: red;
strokecolor: yellow;
}
, VML.
ββ , VML SVG ( ) CSS. SVG ββ VML , SVG VML.