当前位置: 首页 > 图文教程 > 网页制作 > CSS样式表 > Line,Polyline(线)对象

CSS样式表
网页设计布局基础
Lesson01_01 HTML基础
HTML的全局架构标签
Lesson01_03 注释与特殊字符
Lesson01_04 格式标签与文本标签
Lesson01_05 HTML中的超链接
Lesson01_07 图像标签
Lesson02_01 表格标签
Lesson02_02 帧标签
Lesson02_03 表单标签
Lesson02_04 表单标签(2)
Lesson02_05 头元素
Lesson02_06 分区标签
Lesson03_02 样式规则选择器
学习标准——笔记
用好href的target属性
常用CSS集合
教你如何用CSS来控制网页字体的显示样式
用CSS解决中英文混合字符串的截取省略问题的解决办法
鼠标移动到超链接上的效果

CSS样式表 中的 Line,Polyline(线)对象


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-12   浏览: 118 ::
收藏到网摘: n/a

Line是做图中最常用的,它有两个特殊的属性 from 和 to ,就是起始点和终止点坐标。
<v:line from="0,0" to="100,50" style="position:relative;"/>

●如果要改变线的样式,LineStyle (Stroke)属性可以做到:
Single(默认),ThinThinThinThickThickBetweenThin
●如果要改变线的类型,可以用 DashStyle(Stroke)属性:
<v:line style="position:relative" from="0,0" to="100,0" >
<v:stroke dashstyle="Dot"/>
</v:line>
Solid(默认):见上图
ShortDash:
ShortDot:
ShortDashDot:
ShortDashDotDot:
Dot:
Dash:
LongDash:
DashDot:
LongDashDot:
LongDashDotDot:
●在画坐标的时候,需要箭头,VML已经定义好了箭头,在Stroke体现:EndArrow 和 StartArrow 属性,一个是线开始的时候有箭头,另一个是线结束的时候有箭头。箭头的样式也有不少:
<v:line style="position:relative" from="0,0" to="100,0" >
<v:stroke EndArrow="Classic"/>
</v:line>
EndArrow="Block":
EndArrow="Classic": (这个看起来还比较舒服)
EndArrow="Diamond":
StartArrow="Oval":
StartArrow="Open":

PolyLine是 Line 的变形,是不规则的连续的线。它有个特殊的属性 Points ,用来设置每个点的坐标。例如:
<v:PolyLine filled="false" Points="0,0 0,100 20,150 200,100" style="position:relative"/>

一样可以设置它的线的样式和类型以及箭头 ( IE5.0中,PolyLine不支持 Arrow )
<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>