Scale everything according to browser size
(should be parametrized a bit better)
This commit is contained in:
parent
898998e48a
commit
e7f2bd171a
14
index.html
14
index.html
@ -207,6 +207,7 @@
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<div id="viewport">
|
||||
<div id="floor" style="
|
||||
left:0px;
|
||||
@ -278,6 +279,19 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// Scale viewport to fit device width
|
||||
function apply_scale() {
|
||||
var scale = window.innerHeight / 480.0;
|
||||
$("#viewport").css({ "transform": "scale(" + scale + ")", "transform-origin": "0 0" });
|
||||
}
|
||||
|
||||
window.onresize = apply_scale;
|
||||
|
||||
apply_scale();
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
x
Reference in New Issue
Block a user