【发布时间】:2019-01-11 17:32:34
【问题描述】:
我需要创建一个响应式布局来显示大量数据,这些数据需要在所有设备上都可以访问。
这是我的 Wrapper 和面板代码。
.wrapper {
max-width: 940px;
margin: 0 20px;
display: grid;
grid-gap: 10px;
grid-template-columns: repeat(4, minmax(200px, 1fr));
grid-auto-rows: minmax(150px, auto);
background-color: #fff;
color: #444;
}
/* fix for unsuported*/
.wrapper {
display: flex;
flex-wrap: wrap;
}
.panel {
background-color: #EBEBEB;
color: #333;
border-radius: 5px;
padding: 12px;
flex: 1 1 200px;
margin: 4px;
}
【问题讨论】:
-
请添加带有 HTML 和 CSS 样式的最小示例。可能您的“不支持的修复”显示属性会覆盖网格布局并且它不起作用。
标签: css grid-layout css-grid