The code that is being rendered Shows the table rendered, as you can see, once I scroll past the max width the data wont show材料UI表都有一个毁了我的CSS额外div标签
<div>
<table (not gonna show all the markup for this. this table holds the headers of each column. this appears when i scroll to the right past the max width)>
</div>
<div styel="height: inherit; overflow-x:hidden; overflow-y: auto;">
<table (not gonna show all the markup. this holds the rows of data, that dont appear past the max width)>
</div>
当从图像1中的代码获取呈现,存在过去的最大宽度确实数据当我滚动到右侧时不会显示。
然而,表格标题确实如此。经过调查,我发现问题是div
标签。
它的标记,当我检查网页(HTML代码段以上)的方式,table
的头被包裹在一个div
标签,以及table
的body
被包裹在另一个div
标签。
身体周围的div
标签有风格overflow-:x hidden
和overflow-y: auto
(绕头的div
标签有没有风格)。
如果我没有设置这两个溢出,表格看起来完全是我想要的样子。
但是,我没有编码这些div标签,我不知道他们是如何到达那里的,我猜材料UI把它们放在那里。我如何更改或摆脱这些标签?还是有解决办法?