每行的不同列大小(网格)
I am using CSS Grid in my layout...
How do I set different column size on first row and full width on second row?
Is this possible?
Thank you so much!!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是不可能的,CSS网格的想法是具有“网格”,即所有行都遵循相同的列配置。
但是,您可以做的是要有一个元素跨越几列,在这里您有几个选择:
从第一列到第一列从第一个列到第一个列,
从第一列跨越第一个列:
This is not possible, the idea of css grid is to have a "grid", that is all the rows follow the same column configuration.
What you can do however is have an element span several column, and here you have several options:
This one stretches from the first column to the first from the end
This one spans 2 columns from the first one: