Skip to content

Commit 185ef90

Browse files
committed
svg
1 parent 161b177 commit 185ef90

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

前端svg指南.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# svg
2+
- 矢量,利用标签
3+
- 利用标签和css作图
4+
## 比例尺viewBox
5+
- > 地图放大缩小
6+
## 标签
7+
- 线段:line
8+
- x1,y1: x2, y2依次
9+
- 矩形:rect
10+
- 圆角xr,yr
11+
> 闭合的图形不需要手动stroke
12+
- 圆形:cricle
13+
- r半径,cx,cy圆心
14+
- 椭圆:ellipse
15+
- 短半径,长半径rx,ry,圆心cx,cy
16+
- 折线:polyline
17+
- point依次填入坐标
18+
> 默认自动填充 fill置空
19+
- polygon
20+
- 和polyline区别是会自动闭合
21+
- 文本:text
22+
- x,y位置
23+
- **path**
24+
- d属性:M起点 L目标点 l
25+
- H水平 V竖直
26+
- z:不区分大小写,闭合线段
27+
- A
28+
- 大写字母绝对位置,小写相对位置
29+
## 属性
30+
- troke
31+
- troke-width
32+
- fill-opacity
33+
- stoke-opacity
34+
- stroke-linecap:线段端点样式
35+
- stroke--linejoin:线段相交样式
36+
## 做一个直线
37+
stroke: **color**
38+
stroke-width: **px**
39+
## 曲线
40+
> M起点 A长弧,短弧 旋转角度 大弧0/1小狐 顺时针0/1逆时针
41+
## 线性渐变
42+
<defs>
43+
<linearGradient
44+
x1,y1
45+
x2,y2
46+
>
47+
<stop offset="" style-color></stop>
48+
<stop offset="" style-color></stop>
49+
</linearGradient>
50+
<defs>
51+
52+
> 使用fill: url(```id```)引用
53+
54+
## 高斯模糊
55+
<defs>
56+
<></>
57+
<defs>
58+
59+
## 虚线

0 commit comments

Comments
 (0)