This function of VML is very useful. As the name suggests, it can reduce the amount of code written and improve the readability of the code. When understanding VML templates, you can understand them the same as HTML CSS. It is a defined shape. You can just declare the type attribute when you use it next time. Take a look at the following example:
<v:shapetype coordsize="6 6"> <!--Triangle Upward-->
<v:path v="m 3,0 l 0,6,6,6,3,0 x e" />
</v:shapetype>
<v:shapetype coordsize="6 6"> <!--Triangle Down-->
<v:path v="m 0,0 l 3,6,6,0,0,0 x e" />
</v:shapetype>
After defining the above template, you can call it directly in the future:
<v:shape type="#arrowUP" style="position:relative;width:50;height:50"/>
<v:shape type="#arrowDown" style="position:relative;width:50;height:50"/>
<v:shape fillcolor=blue type="#arrowDown" style="position:relative;width:80;height:80" />
I wonder if you have noticed that the use of "," in VML is not mandatory. You can use coordsize="6,6" or coordsize="6 6" and the effect is the same.
<v:shapetype coordsize="6 6"> <!--Triangle Upward-->
<v:path v="m 3,0 l 0,6,6,6,3,0 x e" />
</v:shapetype>
<v:shapetype coordsize="6 6"> <!--Triangle Down-->
<v:path v="m 0,0 l 3,6,6,0,0,0 x e" />
</v:shapetype>
After defining the above template, you can call it directly in the future:
I wonder if you have noticed that the use of "," in VML is not mandatory. You can use coordsize="6,6" or coordsize="6 6" and the effect is the same.