H5-svg预定义形状

1、rect  矩形

属性:

x 定义矩形左上角的点的x坐标 

y 定义矩形左上角的点的y坐标 

rx 定义矩形四个圆角的x半径

ry 定义矩形四个圆角的y半径

width 定义矩形的宽度

height 定义矩形的高度

 

2、circle  圆形

属性:

cx 圆心x坐标

cy 圆心y坐标

r 半径

 

3、ellipse 椭圆

属性:

cx 圆心x坐标

cy 圆心y坐标

rx 半径x

ry 半径y

 

4、line 线条

属性:

x1 起点x坐标

y1 起点y坐标

x2 终点x坐标

y2 终点y坐标

 

5、polyline  折线

属性:points  设置多个点的坐标

<polyline points="10 10, 50 50, 75 175, 175 150, 175 50, 225 75, 225 150, 300 150" fill="none" stroke="#000"/>

 

6、polygon 多边形

属性:points 设置多个点的坐标

<polygon points="10 10, 50 50, 75 175, 175 150, 175 50, 225 75, 225 150, 300 150" fill="red" stroke="#000"/>

 

7、path

 

posted @ 2015-11-23 15:12  youy  Views(630)  Comments(0)    收藏  举报