---
id: 5a94fe1369fb03452672e45d
title: Place Items in Grid Areas Using the grid-area Property
challengeType: 0
videoUrl: 'https://scrimba.com/p/pByETK/cRrqmtV'
forumTopicId: 301132
localeTitle: 使用 grid-area 属性将项目放置在网格区域中
---
## Description
像上一个挑战那样,在为网格添加区域模板后,你可以通过引用你所定义的区域的名称,将元素放入相应的区域。为此,你需要对网格项使用grid-area
:
```css
.item1 {
grid-area: header;
}
```
这样,类名为item1
的网格项就被放到了header
区域里。在这个示例中,网格项将占用整个顶行,因为这一整行都被命名为 header 区域。
## Instructions
请使用grid-area
属性,把类为item5
元素放到footer
区域。
## Tests
```yml
tests:
- text: 'item5
类应该有grid-area
属性且值为footer
。'
testString: 'assert(code.match(/.item5\s*?{[\s\S]*grid-area\s*?:\s*?footer\s*?;[\s\S]*}/gi));'
```
## Challenge Seed
## Solution
```js
// solution required
```