Skip to content

Commit

Permalink
Fix body height width
Browse files Browse the repository at this point in the history
  • Loading branch information
oeway committed Aug 26, 2020
1 parent 65b432c commit 02a3e8c
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
<title>ImageJ.JS</title>
<script src="https://cjrtnc.leaningtech.com/2.1/loader.js"></script>
<style>
body {
width: 100vw;
height: 100vh;
margin: 0px;
}

.container {
width: calc(100vw - 20px);
height: calc(100vh - 20px);
Expand All @@ -32,6 +38,7 @@
#cheerpjDisplay {
box-shadow: none;
}

.menu {
z-index: 9999;
}
Expand Down Expand Up @@ -72,9 +79,9 @@
</script>
<script>
// fix ios height issue
function resetHeight(){
// reset the body height to that of the inner browser
document.body.style.height = window.innerHeight + "px";
function resetHeight() {
// reset the body height to that of the inner browser
document.body.style.height = window.innerHeight + "px";
}
// reset the height whenever the window's resized
window.addEventListener("resize", resetHeight);
Expand Down

0 comments on commit 02a3e8c

Please sign in to comment.