-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmy-editor.html
78 lines (76 loc) · 1.91 KB
/
my-editor.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Title</title>
<style>
* {
padding: 0;
margin: 0;
}
body {
background-color: #dddddd;
}
#canvas {
margin: 0 auto;
border: 1px solid #ddd;
display: block;
background: white;
}
.content {
display: flex;
justify-content: space-between;
}
.right {
margin-right: 100px;
display: flex;
flex-direction: column;
}
[name="setter"] {
width: 60px;
}
</style>
</head>
<body>
<div>
<input type="radio" name="graphType" value="polygon" checked />多边形
<input type="radio" name="graphType" value="bezier" />贝塞尔曲线
<select id="mode">
<option value="0">创建</option>
<option value="1">移动</option>
<option value="2">编辑</option>
</select>
<input id="side" type="number" value="3" />边数
</div>
<div class="content">
<canvas id="canvas" width="1000" height="800"></canvas>
<div class="right">
<label
><input
type="color"
name="setter"
data-a="fillColor"
id="fc"
/>背景颜色</label
>
<label
><input
type="color"
name="setter"
data-a="strokeColor"
id="sc"
/>边框颜色</label
>
<label><input type="number" name="setter" data-a="x" id="x" />X</label>
<label><input type="number" name="setter" data-a="y" id="y" />Y</label>
<label
><input type="number" name="setter" data-a="width" id="w" />W</label
>
<label
><input type="number" name="setter" data-a="height" id="h" />H</label
>
</div>
</div>
<script src="./editor.js"></script>
</body>
</html>