-
Notifications
You must be signed in to change notification settings - Fork 0
/
soccer.html
74 lines (70 loc) · 2.84 KB
/
soccer.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
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<div id="field">
<div class="goal" id="rgoal"></div>
<div class="goal" id="lgoal"></div>
<div class="box" id="lbox1"></div>
<div class="box" id="rbox1"></div>
<div class="box" id="lbox2"></div>
<div class="box" id="rbox2"></div>
<div id="midline"></div>
</div>
<style type="text/css">
body{
position:relative;
margin:0px;
background-color: black;
}
#field{
position:relative;
margin:0px;
background-color:green;
}.goal{
position:fixed;
background-color:white;
}.box{
position:fixed;
border-style:solid;
border-color:white;
}#midline{
position:fixed;
border-style:solid;
border-color:white;
}
</style>
<script type="text/javascript">
var height = window.innerHeight
var width = window.innerWidth
document.getElementById('field').style.height = String(height)+"px"
document.getElementById('field').style.width = String(height*1.3)+"px"
document.getElementById('field').style.left = String((width-(height*1.3))*.5)+"px"
document.getElementById('lgoal').style.width = String(height*.03)+"px"
document.getElementById('lgoal').style.height = String(height*.08)+"px"
document.getElementById('lgoal').style.top = String(height*.46)+"px"
document.getElementById('rgoal').style.width = String(height*.03)+"px"
document.getElementById('rgoal').style.height = String(height*.08)+"px"
document.getElementById('rgoal').style.top = String(height*.46)+"px"
document.getElementById('rgoal').style.left = String(((width-(height*1.3))*.5+(height*1.3))-(height*.03))+"px"
document.getElementById('lbox1').style.height = String(height*.2)+"px"
document.getElementById('lbox1').style.width = String(height*.06)+"px"
document.getElementById('lbox1').style.top = String((height/2)-(height*.1))+"px"
document.getElementById('rbox1').style.height = String(height*.2)+"px"
document.getElementById('rbox1').style.width = String(height*.06)+"px"
document.getElementById('rbox1').style.top = String((height/2)-(height*.1))+"px"
document.getElementById('rbox1').style.left = String(((width-(height*1.3))*.5+(height*1.3))-(height*.065))+"px"
document.getElementById('lbox2').style.height = String(height*.44)+"px"
document.getElementById('lbox2').style.width = String(height*.18)+"px"
document.getElementById('lbox2').style.top = String((height/2)-(height*.22))+"px"
document.getElementById('rbox2').style.height = String(height*.44)+"px"
document.getElementById('rbox2').style.width = String(height*.18)+"px"
document.getElementById('rbox2').style.top = String((height/2)-(height*.22))+"px"
document.getElementById('rbox2').style.left = String(((width-(height*1.3))*.5+(height*1.3))-(height*.185))+"px"
document.getElementById('midline').style.left = String((height*1.3*.5)+(((width-(height*1.3))*.5)))+"px"
document.getElementById('midline').style.height = String((height))+"px"
</script>
</body>
</html>