Now, I need to set the '#bottomshow' div's height full of the rest of the device screen.
At first, I use rem
to set the style. The '#bg' and the '#topSelector',I set the height with rem
.
How to set the '#bottomshow' match the full empty of the screen. In other words, I need to set the HTML to fill the full mobile phone screen.
html,
body {
height: 100%;
}
#bg {
width: 100%;
height: 1.76rem;
background-color: lightgoldenrodyellow;
}
#topSelector {
width: 100%;
background-color: rgb(0, 242, 242);
text-align: center;
margin: 0;
height: .44rem;
}
#bottomShow {
overflow-y: auto;
height: 40px;
background-color: purple;
}
<div id="bg"></div>
<div id="topSelector"></div>
<div id="bottomShow">
</div>
<script src="js/jquery-3.1.1.min.js"></script>
<script src="js/mobileRemSet.js"></script>
<script type="text/javascript">
mobileRemSet(window, 375);
</script>
This is my code above. mobileRemSet(window,375);
is to set the rem unit. Now I set the bottomShow
height 40px
. Is there a way to change its height to fill the rest area?