我正在尝试在 VML 中创建一个与clip-path
SVG 对应的剪贴蒙版?那可能吗?
基于大量但相当有限的示例,我尝试绘制形状:
<vml:group style="WIDTH: 1px; HEIGHT: 1px" class=vml-element coordsize = "1,1">
<vml:shape style="WIDTH: 1px; HEIGHT: 1px" id=vectorObject2 class=vml-element _fill-color="red" _fill-opacity="1" _stroke-color="black" _stroke-opacity="1" _stroke-width="1" coordsize = "1,1" filled = "t" fillcolor = "red" stroked = "t" strokecolor = "black" strokeweight = ".75pt" path = "m0,0 l100,0,0,100 xe">
<vml:fill class=vml-element opacity = "1"></vml:fill>
<vml:stroke class=vml-element opacity = "1"></vml:stroke>
</vml:shape>
</vml:group>
然后使用vmlframe
:
<vml:vmlframe class=vml-element clip = "t" size = "15pt,37.5pt" src = "#vectorObject2"> </vml:vmlframe>
形状(三角形)的绘制按预期工作,但我找不到使用vmlframe掩盖它的方法。这是实现掩蔽的正确方法吗?
请忽略所有奇怪的自定义属性,因为大多数 VML 代码是通过 3rd 方库生成的。
提前致谢!