-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
98 lines (89 loc) · 2.58 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<!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>Simulazione</title>
</head>
<body>
<div id="container">
<!-- si aspettano nodi -->
</div>
<form id="new-values">
<label for="n">Numero nodi:</label>
<input id="n" type="number">
<button type="submit">GENERA</button>
</form>
<style>
:root{
--container-w: 1200px;
--container-h: 900px;
--node-w: 10px;
--node-h: 10px;
--transition-time: 2s;
}
#container{
width: var(--container-w);
height: var(--container-h);
border: 2px solid rebeccapurple;
position: relative;
overflow: hidden;
}
.node{
width: var(--node-w);
height: var(--node-h);
background-color: orangered;
position: absolute;
border-radius: 50%;
translate: -50% 50%;
}
.running-node{
background-color: blue;
}
.circle{
position: absolute;
bottom: 0;
left: 0;
width: 100px;
height: 100px;
background-color: transparent;
border: 2px solid rgb(0, 255, 76);
border-radius: 50%;
translate: -50% 50%;
animation: animation var(--transition-time) linear;
}
@keyframes animation{
0%{
width: 0;
height: 0;
}
90%{
opacity: 1;
}
100%{
opacity: 0;
width: 400px;
height: 400px;
}
}
.circle_range{
position: absolute;
bottom: 0;
left: 0;
width: 500px;
height: 500px;
background-color: transparent;
border: 1px dashed rgb(255, 100, 20);
border-radius: 50%;
translate: -50% 50%;
}
</style>
<script src="script.js"></script>
<!-- <link rel="stylesheet" href="https://pyscript.net/latest/pyscript.css" /> -->
<!-- <script defer src="https://pyscript.net/latest/pyscript.js"></script> -->
<!-- P = P_A^(1*10) ⊗ P_B^(2*10) ⊗ P_C^(3*10) -->
<!-- <py-script>
</py-script> -->
</body>
</html>