Make game fully responsive (try resizing window...)

This commit is contained in:
Mathew Huusko V 2014-05-18 14:26:08 -04:00
parent 66eba573d1
commit 5794bcf68e

View file

@ -13,7 +13,6 @@
body {
color: white;
font-family: 'Roboto', sans-serif;
font-size: 24px;
}
</style>
@ -22,15 +21,15 @@
</head>
<body style="background-color:#2c3e50">
<div style="margin: 20px auto 0 auto; width: 100%; text-align: center;">
<h1 style="color:#ecf0f1; font-size:50px;">Hextris</h1>
<span id="score">0 (x1)</span>
<div style="margin: 1vmin auto 0 auto; width: 100%; text-align: center;">
<h1 style="color: #ecf0f1; font-size: 10vmin;">Hextris</h1>
<span id="score" style="color: #ecf0f1; font-size: 4vmin;">0 (x1)</span>
</div>
<canvas id="canvas" width="700px" height="700px" style="background-color:#2c3e50; position:absolute; left:50%; margin-left:-350px;"></canvas>
<canvas id="canvas" width="700px" height="700px" style="position: absolute; left: calc(50% - 80vmin / 2); height: 80vmin; width: 80vmin; background-color: #2c3e50;"></canvas>
<div id="leftTap" style="position:absolute; left:0; top:0; height:100%; width:50%;"></div>
<div id="rightTap" style="position:absolute; left:50%; top:0; height:100%; width:50%;"></div>
<div id="leftTap" style="position: absolute; left: 0; top: 0; height: 100%; width: 50%;"></div>
<div id="rightTap" style="position: absolute; right: 0; top: 0; height :100%; width: 50%;"></div>
<script src="js/math.js"></script>
<script src="js/entities.js"></script>