【发布时间】:2018-11-07 02:42:01
【问题描述】:
我怎样才能使地图使用全高?
<body class="d-flex flex-column">
<header class="flex-grow-0 flex-shrink-0">
header
</header>
<main class="flex-grow-1 flex-shrink-1">
main
<div class="map-container row-content">
<div id="map"></div>
</div>
</main>
<footer>footer</footer>
</body>
css:
html,
body {
height: 100%;
}
main {
height: 100%;
background-color: deepskyblue;
}
.map-container {
}
#map {
height: 100%;
background-color: lightsalmon;
}
当我将高度 100% 添加到地图容器时,高度将太高并且滚动条可见。 我的页脚高度可变,所以我不能使用 calc。
谢谢
【问题讨论】:
标签: css bootstrap-4 height