【发布时间】:2020-09-22 23:09:15
【问题描述】:
我是 React 新手。我正在尝试以 50-50 的比例在网页(顶部和底部)中放置两个 buttonBar + tables。但是,我想通过拖动来调整它们的大小。如何将“buttonBar”和“table”分组为组件并使它们像可调整大小的div。是否有任何库可以使用或者可以由html 和css 完成?这是我的代码。谢谢!
<div id='buttonBar1'>
<....lots button......>
</div>
<div id="table1" style={{marginRight:"auto", marginLeft:"inherit", width:"100vw", position:'relative', height:"50vh"}} >
<Table id={'Table_1'} />
</div>
<div id='buttonBar2'>
<....lots button......>
</div>
<div id="table2" style={{marginRight:"auto", marginLeft:"inherit", width:"auto", position:'relative', height:"40vh"}}>
<Table id={'Table_2'} />
</div>
【问题讨论】:
-
只需使用
table-responsive类中内置的引导程序。 -
@Ahmad 感谢您的回答,但这不是我真正想要的。实际上,我想让它像分屏一样,并将它们分成 2 个组件。并让用户调整页面高度。