-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex copy.html
More file actions
executable file
·82 lines (80 loc) · 2.69 KB
/
index copy.html
File metadata and controls
executable file
·82 lines (80 loc) · 2.69 KB
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
79
80
81
82
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Dibujando con canvas</title>
</head>
<link rel="stylesheet" href="styles.css" />
<body>
<h1>Dibujando con JavaScript</h1>
<br /><br />
<!-- Formulario para seleccionar el tamaño del canvas -->
<div class="format">
<form action="Pixeles" method="get">
<label for="Pixeles">Elige el tamaño en Pixeles:</label>
<select name="Pixeles" id="Pixeles">
<option value="300 x 300">300 x 300</option>
<option value="500 x 500">500 x 500</option>
<option value="800 x 800">800 x 800</option>
</select>
</form>
<!-- Paleta de colores -->
<label for="paleta">Elige un color:</label>
<button
type="button"
onclick="actualizarColor('#000000')"
class="color-button"
style="background-color: #000000; width: 40px; height: 40px"
></button>
<button
type="button"
onclick="actualizarColor('#FF0000')"
class="color-button"
style="background-color: #ff0000; width: 40px; height: 40px"
></button>
<button
type="button"
onclick="actualizarColor('#329f32')"
class="color-button"
style="background-color: #329f32; width: 40px; height: 40px"
></button>
<button
type="button"
onclick="actualizarColor('#0000FF')"
class="color-button"
style="background-color: #0000ff; width: 40px; height: 40px"
></button>
<button
type="button"
onclick="actualizarColor('#FFFF00')"
class="color-button"
style="background-color: #ffff00; width: 40px; height: 40px"
></button>
<button
type="button"
onclick="actualizarColor('#512ab3')"
class="color-button"
style="background-color: #512ab3; width: 40px; height: 40px"
></button>
<button
type="button"
onclick="actualizarColor('#FF00FF')"
class="color-button"
style="background-color: #ff00ff; width: 40px; height: 40px"
></button>
<br /><br />
<!-- Canvas para dibujar -->
<canvas width="300" height="300" id="Area de dibujo"></canvas>
<script src="evento_mouse.js"></script>
</div>
<div href="#" class="boton-whatsapp">
<img
src="https://github.com/CodeGeekR/dibuja_con_JS/blob/main/whatsapp-48.png?raw=true"
alt="whatsapp"
/>
</a>
</div>
</body>
</html>