如何使用VML绘制鱼?

时间:2017-10-27 05:22:51

标签: vector-graphics

我想用Vector Markup Laguage(VML)绘制两条鱼 其中一个的嘴是打开的,另一个的嘴是封闭的 我想画的鱼类似下面的图片:
Picture of fish with a closed mouth [![张开嘴的鱼的图片] [2]] [2]
顺便说一句,抱歉,如果没有显示图片。我上传了图片,但是当我发布问题时,图片没有显示在问题的文本中。

1 个答案:

答案 0 :(得分:0)

我终于使用VML成功画了一条鱼 这是我使用的代码:

<div style="position:absolute;left:200;top:200;" id="fish">
    <!-- The fish outline -->
    <v:line strokecolor="black" strokeweight="1px" from="71,0" to="0,71"></v:line>
    <v:line strokecolor="black" strokeweight="1px" from="0,71" to="71,142"></v:line>
    <v:line strokecolor="black" strokeweight="1px" from="71,0" to="191,120"></v:line>
    <v:line strokecolor="black" strokeweight="1px" from="71,142" to="191,22"></v:line>
    <!-- The fish's "belt" -->
    <v:arc style="width:40;height:142;position:absolute;left:48;top:0;" startangle="20" endangle="160" strokecolor="black" strokeweight="1px"></v:arc>
    <!-- The fish's eye -->
    <v:oval strokecolor="black" strokeweight="1px" style="width:25;height:35;position:absolute;left:50;top:27;"></v:oval>
    <v:oval fillcolor="black" style="width:10;height:15;position:absolute;left:55;top:40;"></v:oval>
    <!-- The fish's tail -->
    <v:arc strokecolor="black" strokeweight="1px" startangle="0" endangle="85" style="rotation:46;flip:y;width:45;height:100;position:absolute;left:134;top:35"></v:arc>
    <v:arc strokecolor="black" strokeweight="1px" startangle="0" endangle="85" style="rotation:46;width:45;height:100;position:absolute;left:134;top:7"></v:arc>
</div>

我将用于创建鱼的VML元素放在DIV元素中。但我没有将它们放在v:group元素中。因为如果我这样做,鱼就不会显示在程序的窗口上。我不知道为什么。