-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
51 lines (45 loc) · 1.21 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>CSMA/CD</title>
<style>
.container {
position: relative;
width: 1024px;
margin-left: auto;
margin-right: auto;
border: 1px solid red;
height: 1024px;
}
.container cable, .container computer {
position: absolute;
}
cable, computer {
display: inline-block;
width: 30px;
height: 30px;
border: 1px solid black;
}
cable[collision='true'] {
background-color: gray;
}
computer {
border: 5px solid blue;
}
computer[disabled='true'] {
background-color: brown;
}
</style>
</head>
<body>
<div id="topology" class="container">
Reached destination: <span id="reached">0</span><br>
Sent: <span id="sent">0</span><br>
Success rate: <span id="stats"></span>
</div>
</body>
<script src="bundle/main.js"></script>
</html>