gpt4 book ai didi

javascript - HighCharts + reveal.js 图表大小

转载 作者:行者123 更新时间:2023-11-30 16:45:50 28 4
gpt4 key购买 nike

我在 reveal.js 演示文稿中展示了很多图表,但我遇到了一个问题,我的一些图表随机调整了它们的大小,我需要刷新页面以使其再次恢复正常大小。这是代码

<section>
<center>
<div id="chart1" style="min-width: 465px; height: 600px; max-width: 900px;"></div>
</center>
</section>
<section>
<center>
<div id="chart2" style="min-width: 465px; height: 600px; max-width: 900px;"></div>
</center>

我必须添加 <center></center>其他方式有时图表不会显示在幻灯片的中心,如果我也刷新页面,图表会居中。我加入了一些截图。中心的问题:

Chart not at the center After Refresh但是如果我输入 <center></center> 就没有问题了

尺寸问题: chart with a weird size chart after refresh

如果你们能帮我找到解决办法,或者如果你们知道发生了什么。

最佳答案

<section>
<center>
<div id="chart1" style="height: 600px; width: 900px;"></div>
</center>
</section>

这解决了问题。

关于javascript - HighCharts + reveal.js 图表大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31257342/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com