-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
59 lines (54 loc) · 1.57 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
48
49
50
51
52
53
54
55
56
57
58
59
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Circuit Simulator</title>
<style>
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #f0f0f0;
font-family: Arial, sans-serif;
}
.toolbar {
margin-right: 20px;
display: flex;
flex-direction: column;
}
.button {
margin: 5px 0;
padding: 10px;
background-color: #007BFF;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
width: 150px;
}
.button:hover {
background-color: #0056b3;
}
canvas {
border: 1px solid black;
background-color: white;
cursor: pointer;
}
</style>
</head>
<body>
<div class="toolbar">
<button class="button" id="addResistorBtn">Add Resistor</button>
<button class="button" id="addCapacitorBtn">Add Capacitor</button>
<button class="button" id="addInductorBtn">Add Inductor</button>
<button class="button" id="addBatteryBtn">Add Battery</button>
<button id="simulateBtn">Simulate Circuit</button>
</div>
<div id="simulationResults"></div>
<canvas id="circuitCanvas" width="800" height="600"></canvas>
<script src="script.js"></script>
</body>
</html>