-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
47 lines (46 loc) · 2.24 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>i-Paint!</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<h1>i-Paint</h1>
<p>Draw anything you want! Enjoy it~~</p>
<div id="bigest">
<canvas id="draw" width="500" height="500" style="background-color: white;">
Your browser does not support the HTML canvas tag.
</canvas>
<script src="all.js"></script>
<div>
<div id="step1">
<h3>1. First step "set background color!"</h3>
<h4>Remember to set background color first or your things will be covered!</h4>
<div style="margin-top: 8px;">background color : </div><input id="bgColor" type="color" value="#ffffff">
<input type="button" value="set background color" onclick="backgroundColor()" style="position: absolute; left: 830px; top: 145px;" id="bt1">
</div>
<br>
<div id="step2">
<h3>2. Second step "choose the size & the color of the pen"</h3>
size : <input id="s" type="range" min="0" max="20">
<br>
<h4>Pick a color you like! And start to paint~~</h4>
<input type="radio" id="type" name="type" value="pen" onclick="submit()" checked>
pen color : <input id="c"type="color" value="#000000">
<br>
<h4>Want to change somethig? Try to use the eraser!</h4>
<input type="radio" id="type" name="type" value="eraser" onclick="submit()"> eraser
</div>
<div id="step3" style="position: absolute; top: 410px;">
<h3>3. Final step!!</h3>
<h4>Like your paint? Save it!! Don't like it? Press the button and try again!</h4>
<button id="bt1"><a href="#" download="image.jpeg" onclick="this.href=canvas.toDataURL();">download as jpeg</a></button>
<h4>Don't like it? Press the button and try again!</h4>
<input type ="button" value ="clean the canvas" onclick ="clean()" id="bt1">
</div>
</div>
</div>
</body>
</html>