我尝试按照以下方式设置CSS网格布局
.wrapper {
width: 800px;
display: grid;
grid-template-columns: repeat(3, 200px);
grid-template-rows: repeat(5, 200px);
}
是否可以在JS中定位grid-template-columns,然后调整列的大小?我遇到了这样的情况,在找到它之后(我丢失了代码),当我尝试更改它时,Chrome DevTools显示该值已计算,并且无法更改。
非常感谢任何帮助指引我正确的方向(或其他方法来做到这一点,但必须使用grid)。
谢谢。
73.0.3683.75 (Official Build) (64-bit)
Firefox65.0 (64-bit)
你可以在这里检查:https://codepen.io/bileschi/pen/ZPRPqr - BlessedKey