【问题标题】:how to hide horizontal lines from the table without hiding vertical lines (Material-ui)如何隐藏表格中的水平线而不隐藏垂直线(Material-ui)
【发布时间】:2021-01-13 11:17:19
【问题描述】:

我需要隐藏下表中的水平线以及时隙。
我尝试将td 元素的visibility 设置为hidden,但这也隐藏了垂直线。
知道如何解决这个问题吗?

【问题讨论】:

    标签: html css reactjs material-ui


    【解决方案1】:

    您想覆盖 MUI TableCell 组件的 border-bottom 样式。

    const useStyles = makeStyles({
      row: {
        "& > td": {
          borderBottom: 'none'
        }
      }
    });
    
    {rows.map((row) => (
      <TableRow key={row.name} className={classes.row}>
        {/* your TabelCell components */}
      </TableRow>
    ))}
    

    我并不完全清楚你想用时间列完成什么,这需要实际的代码来查看。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-04-29
      • 1970-01-01
      • 1970-01-01
      • 2011-02-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-11-15
      相关资源
      最近更新 更多