⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 step3.html

📁 vml教程
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html xmlns:v="urn:schemas-microsoft-com:vml">
<head>
	<title>Thinking in VML</title>
</head>
<STYLE>
 v\:* { BEHAVIOR: url(#default#VML) }
</STYLE>
<LINK REL="stylesheet" TYPE="text/css" HREF="style.css" />
<body>
<table align="center">
<tr>
<td align="center" class="title"><strong>Line,Polyline(线)对象</strong></td>
</tr>
<tr>
<td >
<div class="memo" style="width:700;line-height:23px">
&nbsp;&nbsp;&nbsp;&nbsp;Line是做图中最常用的,它有两个特殊的属性 from 和 to ,就是起始点和终止点坐标。<br>
&nbsp;&nbsp;&nbsp;&nbsp;&lt;v:line from="0,0" to="100,50" style="position:relative;"/&gt;<br><br>
<center><v:line from="0,0" to="100,50" style="position:relative;"/></center>
<br><br>
&nbsp;&nbsp;●如果要改变线的样式,LineStyle (Stroke)属性可以做到:<br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color=green>Single</font>(默认),<font color=green>ThinThin</font>,<font color=green>ThinThick</font>,<font color=green>ThickBetweenThin</font><br>
&nbsp;&nbsp;●如果要改变线的类型,可以用 DashStyle(Stroke)属性:<br><br>
&nbsp;&nbsp;&nbsp;&nbsp;&lt;v:line style="position:relative" from="0,0" to="100,0" &gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;v:stroke <font color=red>dashstyle="Dot"</font>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/v:line&gt;<br><br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color=green>Solid</font>(默认):见上图<br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color=green>ShortDash</font>:<v:line style="position:relative" from="0,0" to="100,0" ><v:stroke dashstyle="ShortDash"/></v:line><br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color=green>ShortDot</font>:<v:line style="position:relative" from="0,0" to="100,0" ><v:stroke dashstyle="ShortDot"/></v:line><br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color=green>ShortDashDot</font>:<v:line style="position:relative" from="0,0" to="100,0" ><v:stroke dashstyle="ShortDashDot"/></v:line><br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color=green>ShortDashDotDot</font>:<v:line style="position:relative" from="0,0" to="100,0" ><v:stroke dashstyle="ShortDashDotDot"/></v:line><br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color=green>Dot</font>:<v:line style="position:relative" from="0,0" to="100,0" ><v:stroke dashstyle="Dot"/></v:line><br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color=green>Dash</font>:<v:line style="position:relative" from="0,0" to="100,0" ><v:stroke dashstyle="Dash"/></v:line><br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color=green>LongDash</font>:<v:line style="position:relative" from="0,0" to="100,0" ><v:stroke dashstyle="LongDash"/></v:line><br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color=green>DashDot</font>:<v:line style="position:relative" from="0,0" to="100,0" ><v:stroke dashstyle="DashDot"/></v:line><br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color=green>LongDashDot</font>:<v:line style="position:relative" from="0,0" to="100,0" ><v:stroke dashstyle="LongDashDot"/></v:line><br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color=green>LongDashDotDot</font>:<v:line style="position:relative" from="0,0" to="100,0" ><v:stroke dashstyle="LongDashDotDot"/></v:line><br>
&nbsp;&nbsp;●在画坐标的时候,需要箭头,VML已经定义好了箭头,在Stroke体现:EndArrow 和 StartArrow 属性,一个是线开始的时候有箭头,另一个是线结束的时候有箭头。箭头的样式也有不少:<br><br>
&nbsp;&nbsp;&nbsp;&nbsp;&lt;v:line style="position:relative" from="0,0" to="100,0" &gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;v:stroke <font color=red>EndArrow="Classic"</font>/&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/v:line&gt;<br><br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color=green>EndArrow="Block"</font>:<v:line style="position:relative" from="0,0" to="100,0" ><v:stroke EndArrow="Block"/></v:line><br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color=green>EndArrow="Classic"</font>:<v:line style="position:relative" from="0,0" to="100,0" ><v:stroke EndArrow="Classic"/></v:line>(这个看起来还比较舒服)<br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color=green>EndArrow="Diamond"</font>:<v:line style="position:relative" from="0,0" to="100,0" ><v:stroke EndArrow="Diamond"/></v:line><br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color=green>StartArrow="Oval"</font>:<v:line style="position:relative" from="0,0" to="100,0" ><v:stroke StartArrow="Oval"/></v:line><br>
&nbsp;&nbsp;&nbsp;&nbsp;<font color=green>StartArrow="Open"</font>:<v:line style="position:relative" from="0,0" to="100,0" ><v:stroke StartArrow="Open"/></v:line><br>
<br><br>
&nbsp;&nbsp;&nbsp;&nbsp;<strong>PolyLine</strong>是 Line 的变形,是不规则的连续的线。它有个特殊的属性 Points ,用来设置每个点的坐标。例如:<br><br>
&nbsp;&nbsp;&nbsp;&nbsp;&lt;v:PolyLine filled="false"  <font color=red>Points="0,0 0,100 20,150 200,100"</font> style="position:relative"/&gt;<br>
<center><v:PolyLine filled="false"  Points="0,0 0,100 20,150 200,100" style="position:relative"/></center><br>
&nbsp;&nbsp;&nbsp;&nbsp;一样可以设置它的线的样式和类型以及箭头 ( IE5.0中,PolyLine不支持 Arrow )<br><br>
&nbsp;&nbsp;&nbsp;&nbsp;&lt;v:PolyLine filled="false"  <font color=red>Points="0,0 0,100 20,150 200,100"</font> style="position:relative"/&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&lt;v:stroke StartArrow="Oval" EndArrow="Classic" dashstyle="Dot" /&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&lt;/v:PolyLine&gt;<br>
<center><v:PolyLine filled="false"  Points="0,0 0,100 20,150 200,100" style="position:relative">
<v:stroke StartArrow="Oval" EndArrow="Classic" dashstyle="Dot" />
</v:PolyLine>
</center><br>

</div>
</td>
</tr>
<tr>
<td class="title">
<p align="right"><a href="javascript:self.scrollTo(0,0)">Top</a></p>
<a href="index.html">返回目录</a><br>
上一节:<a href="step2.html">Shape对象与VML坐标系</a><br>
下一节:<a href="step4.html">Rect,RoundRect(矩形)对象</a>
</td>
</tr>
</table>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -