当前位置: 代码网 > it编程>网页制作>Css > Line,Polyline(线)对象

Line,Polyline(线)对象

2024年05月15日 Css 我要评论
line是做图中最常用的,它有两个特殊的属性 from 和 to ,就是起始点和终止点坐标。<v:line from="0,0" to="100,50" style="position:rela
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>
(0)

相关文章:

版权声明:本文内容由互联网用户贡献,该文观点仅代表作者本人。本站仅提供信息存储服务,不拥有所有权,不承担相关法律责任。 如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 2386932994@qq.com 举报,一经查实将立刻删除。

发表评论

验证码:
Copyright © 2017-2025  代码网 保留所有权利. 粤ICP备2024248653号
站长QQ:2386932994 | 联系邮箱:2386932994@qq.com