-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
82 lines (75 loc) · 4.15 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
<style>
body {
background-color: lightgoldenrodyellow;
}
</style>
<script>
var looper;
var degrees = 0;
function rotateAnimation(el, speed) {
var elem = document.getElementById(el);
if (navigator.userAgent.match("Chrome")) {
elem.style.WebkitTransform = "rotate(" + degrees + "deg)";
} else if (navigator.userAgent.match("Firefox")) {
elem.style.MozTransform = "rotate(" + degrees + "deg)";
} else if (navigator.userAgent.match("MSIE")) {
elem.style.msTransform = "rotate(" + degrees + "deg)";
} else if (navigator.userAgent.match("Opera")) {
elem.style.OTransform = "rotate(" + degrees + "deg)";
} else {
elem.style.transform = "rotate(" + degrees + "deg)";
}
looper = setTimeout('rotateAnimation(\'' + el + '\',' + speed + ')', speed);
degrees++;
if (degrees > 359) {
degrees = 1;
}
}
</script>
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/dropsp.css">
<link rel="stylesheet" href="css/dropsm.css">
<title>VLAB</title>
</head>
<body>
<div class="h-75 row">
<div class="col-md-1"></div>
<div class="col-md-10">
<div class="row mt-4">
<div class="col-md-10 text-center">
<button type="button" class="btn btn-success" onclick="start()">Start</button>
</div>
</div>
<div class="row">
<div class="drops" id="drops" style="display: none; position: absolute; left: 420px; top: 660px;"></div>
<div class="dropsp" id="dropsp" style="display: none; position: absolute; left: 420px; top: 670px;"></div>
<div class="dropsm" id="dropsm" style="display: none; position: absolute; left: 420px; top: 670px;"></div>
<img id="burettesol" src="./src/colorless_sol.png" style="position: absolute; left: 418px; top: 348px; width: 15px; opacity: 0.6;">
<img id="needle" src="stirrer1.svg" width="10" height="10" style="position: absolute;
left: 420px;
top: 765px;">
<img id="dropper1" onclick="addp()" src="./src/dropper.png" width="120" height="125" style="position: absolute; left: 545px; top: 730px; opacity: 0.9; display: block;">
<img id="dropper2" onclick="addm()" src="./src/dropper.png" width="120" height="125" style="position: absolute; left: 615px; top: 730px; opacity: 0.9; display: block;">
<img id="dropperp" src="./src/dropperp.png" width="120" height="140" style="position: absolute; left: 405px; top: 570px; opacity: 0.9; display: none;">
<img id="dropperm" src="./src/dropperm.png" width="120" height="140" style="position: absolute; left: 405px; top: 570px; opacity: 0.9; display: none;">
<canvas id="canvas">
</canvas>
</div>
</div>
<div class="col-md-1"></div>
</div>
<script>
rotateAnimation("needle", 0.5)
</script>
<script src="./canvas.js"></script>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
</body>
</html>