The grid-gap
property applies only between grid items. It never applies between a grid item and the grid container.
If you want a gap between the item and the container, then use padding
on the container.
.wrapper {
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-auto-rows: minmax(95px, auto);
grid-gap: 1em;
padding: 1em; /* NEW */
}
https://jsfiddle.net/Ldtcqdtb/3/
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…