图表自动设置父级父级全高。完全忽略了他 parent 的高度。
HTML:
<div class="wrapper">
<div class="huj2">
<div class="huj">
bla bla
</div>
<div class="huj">
<div id="ChartContainer2">
//Chart is here
</div>
</div>
</div>
</div>
CSS:
#ChartContainer2 {
width: 100%;
}
.huj {
height: 50%;
position: relative;
}
.huj2 {
height: 100%;
}
.wrapper {
position: fixed;
height: 100%;
width: 100%;
}
fiddle - http://jsfiddle.net/a40a0bjy/17/
最佳答案
将 Highcharts 容器的高度设置为 100%,它将起作用。以下是您的 fiddle 的代码解决方案。
#ChartContainer2 {
width: 100%;
height:100% ;
}
关于css - Highcharts 父级 100% 高度具有 50% 高度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42086035/