What is an alternative to css subgrid?

后端 未结 2 2120
迷失自我
迷失自我 2020-12-06 02:11

I\'m working on a page with a pretty simple layout - basically a data table, but using grid layout so that the columns will adjust nicely depending on content size. I want t

2条回答
  •  一向
    一向 (楼主)
    2020-12-06 02:40

    Beware of using display:contentsas a substitute for subgrid: there are good reasons why it should be avoided. Instead use either another Grid in the container element or Flex.

    [Adendum 11/1/2020] Firefox supports Subgrid since V71, no word yet from the other browsers. There is a good explanations about the feature in codrops, and you can see some examples here. And this is the link to see the current support in all of the browsers in can I use

提交回复
热议问题