CSS网格忽略第二列中minmax()中指定的最小宽度 [英] CSS grid ignores minimal width specified in minmax() in second column

查看:48
本文介绍了CSS网格忽略第二列中minmax()中指定的最小宽度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网格:

.MakerDataForm {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  grid-gap: 24px 40px;
}

如在开发人员工具弹出窗口中所见,左列的宽度小于320px。

As you see in popup of developer tools, the left column's width is less that 320px.

仅出于实验目的,我尝试将其更改为 minmax(320px,640px)-网格未更改。

Just for experiment, I tried to change to minmax(320px, 640px) - the grid has not changed.

我的错误或错误?

推荐答案

找到了原因。
有些孩子有 grid-column-start:span 2 ,这会中断布局。

Found the cause. Some children has grid-column-start: span 2 which breaks the layout.

必须为新问题

这篇关于CSS网格忽略第二列中minmax()中指定的最小宽度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆