Changed some examples from viewport length and width to percent.

This commit is contained in:
CalvinWilliams1012 2017-09-10 01:36:01 -04:00 committed by Vladimir Agafonkin
parent f90a55ec20
commit b8c1e60424
3 changed files with 6 additions and 6 deletions

View File

@ -13,8 +13,8 @@ title: Leaflet class diagram
maxBounds: bounds
});
map.getContainer().style.width = '100vw';
map.getContainer().style.height= '100vh';
map.getContainer().style.width = '100%';
map.getContainer().style.height= '100%';
document.body.style.margin = 0;
var image = L.imageOverlay('class-diagram.png', bounds).addTo(map);

View File

@ -6,8 +6,8 @@ css: "body {
margin: 0;
}
html, body, #map {
height: 100vh;
width: 100vw;
height: 100%;
width: 100%;
}"
---
<script>

View File

@ -19,8 +19,8 @@ First we'll take a look at the HTML &amp; CSS code of the page. To make our map
margin: 0;
}
html, body, #map {
height: 100vh;
width: 100vw;
height: 100%;
width: 100%;
}
Also, we need to tell the mobile browser to disable unwanted scaling of the page and set it to its actual size by placing the following line in the `head` section or our HTML page: