Home  >  Q&A  >  body text

html - css 如何实现表格每行自适应浏览器?

我写了一个表格,表格里面的数据不确定,用js做成了每隔一段时间自动换一页数据, 已经实现了表格宽度自适应,我想实现整个表格随浏览器的改变, 高度也自动适应,主要是表格数据每一行的高度自动适应,行里内容也自动适应。有哪位大神知道怎么做吗,望告知,万分感谢。

高洛峰高洛峰2713 days ago458

reply all(2)I'll reply

  • 迷茫

    迷茫2017-04-17 13:10:42

    You can implement table width adaptation. You can also use the same method to adapt table width

    reply
    0
  • 黄舟

    黄舟2017-04-17 13:10:42

    When resizing, subtract the height of other parts outside the table from the window height to get the height left for the table, then divide it by the number of rows in the table to get the height of each row, and then reset the table row height style like this No?

    reply
    0
  • Cancelreply