---
id: 5a9036ee38fddaf9a66b5d37
title: Add Gaps Faster with grid-gap
challengeType: 0
videoUrl: ''
localeTitle: 通过网格间隙更快地添加间隙
---
## Description
grid-gap是grid-row-gap和grid-column-gap grid-gap的简写属性,来自前两个更方便使用的挑战。如果grid-gap有一个值,它将在所有行和列之间创建一个间隙。但是,如果有两个值,它将使用第一个值来设置行之间的间隙和列的第二个值。
## Instructions
使用grid-gap在行之间引入10px间隙,在列之间引入20px间隙。
## Tests
```yml
tests:
- text: container类应该有一个grid-gap属性,在行之间引入10px间隙,在列之间引入20px间隙。
testString: 'assert(code.match(/.container\s*?{[\s\S]*grid-gap\s*?:\s*?10px\s+?20px\s*?;[\s\S]*}/gi), "container class should have a grid-gap property that introduces 10px gap between the rows and 20px gap between the columns.");'
```
## Challenge Seed
## Solution
```js
// solution required
```