.grid { display: flex; flex-direction: row; flex-wrap: wrap; } .grid-item { width: 28%; text-align: center; padding-top: 28%; margin-left: 4%; margin-bottom: 4%; position: relative; box-shadow: 0 0 8rpx rgba(0, 0, 0, 0.1); border-radius: 10rpx; background-color: white; } .grid-item-wrapper { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; flex-direction: column; } .grid-icon { width: 64rpx; height: 64rpx; } .grid-text { color: #000; font-size: 28rpx; line-height: 1; margin-top: 28rpx; }