たとえば、次のようなことをしたいと思います。
.myRedPath {
fillcolor: red;
}
...
<v:path class="myRedPath" v="..."/>
パスを赤色で塗りつぶします。これは、VML 要素の塗りと線の属性の色と不透明度で可能ですか? もしそうなら、どのように?
VML は CSS プロパティの代わりに属性を使用するため、スタイル シートでそれらを参照する唯一の方法は、属性値を設定する htc を参照する別の動作 URL を追加することです。それ以外の場合は、HTML 要素を使用して VML 要素をラップし、背景色を追加します。
<!doctype html>
<html xmlns:v xmlns:svg='http://www.w3.org/2000/svg'>
<head>
<meta charset="UTF-8">
<title>Lightbox Simple</title>
<style type="text/css">
/* Hide scrollbars */
/*html, body { overflow: hidden; }*/
/*modal input*/
.trigger { display:inline-block; }
/* Hide modal transparency */
.dialog, .film { position:absolute; left:-7777px; z-index:2; }
/* modal output */
a.trigger:hover .dialog { display: block; left:50%; top:50%; width:500px; border: 1px solid #fff; }
a.trigger:hover .film { left: -3333px; top:-3333px; width:7777px; height:7777px; opacity: .7; background-color: #000; z-index: 3;}
/* modal content */
.visible { display: inline-block; background-color: #999; position:absolute; width: 200px; z-index: 4;}
/* modal off switch */
.closer { z-index:4; position:absolute; top:0; right:20px; display:block; background-color: #fff; color: #fff; width:0; }
.placeholder { position:absolute; top:0; left:0; }
@media,
{
v\:rect,v\:fill { behavior:url(#default#VML);}
.vml_bg
{
position:absolute;
left:0;
top:0;
width:100%;
height:100%;
}
a.trigger:hover .film { width: 0; }
.vml_wrap {
position:absolute;
left:0;
top:0;
width:0;
height:0;
display:inline-block;
}
a.trigger:hover { visibility: visible; }
a.trigger:hover .vml_wrap{ width:7777px; height:7777px; }
}
</style>
</head>
<body>
<p>hey</p>
<span class="closer">X</span>
<a href="#" class="trigger">
you
<span class="vml_wrap"><v:rect fillcolor="black" class="vml_bg"><v:fill opacity="0.5" /></v:rect></span>
<span class="dialog">
<span class="visible">hi</span>
<span class="film">
</span>
</span>
</a>
</body>
</html>