gpt4 book ai didi

javascript - 向表格添加滚动条

转载 作者:行者123 更新时间:2023-11-28 04:43:06 26 4
gpt4 key购买 nike

我有一个表,我在其中动态添加行,并且我想在表的宽度达到 300 或更大时向表添加垂直滚动。有什么建议吗?

最佳答案

您可以将表格包裹在 <div> 中与 overflow: auto风格,如下:

<div style="overflow: auto; width: 300px; height: 300px;">
<table>
</table>
</div>

关于javascript - 向表格添加滚动条,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2198070/

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