---
id: 5a94fe8569fb03452672e464
title: Create Grids within Grids
challengeType: 0
videoUrl: ''
localeTitle: 在网格中创建网格
---
## Description
将元素转换为网格只会影响其直接后代的行为。因此,通过将直接后代转换为网格,您在网格中有一个网格。例如,通过使用item3类设置元素的display和grid-template-columns属性,可以在网格中创建网格。
## Instructions
使用item3类将元素转换为网格,其中两列的宽度为auto , 1fr使用display和grid-template-columns 。
## Tests
```yml
tests:
- text: item3类应该有一个grid-template-columns属性,其中auto和1fr作为值。
testString: 'assert(code.match(/.item3\s*?{[\s\S]*grid-template-columns\s*?:\s*?auto\s*?1fr\s*?;[\s\S]*}/gi), "item3 class should have a grid-template-columns property with auto and 1fr as values.");'
- text: item3类应该具有grid值的display属性。
testString: 'assert(code.match(/.item3\s*?{[\s\S]*display\s*?:\s*?grid\s*?;[\s\S]*}/gi), "item3 class should have a display property with the value of grid.");'
```
## Challenge Seed
## Solution
```js
// solution required
```