freeCodeCamp/curriculum/challenges/chinese/01-responsive-web-design/css-grid/create-your-first-css-grid.md

30 lines
764 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
id: 5a858944d96184f06fd60d61
title: 创建你的第一个 CSS 网格
challengeType: 0
videoUrl: 'https://scrimba.com/p/pByETK/cqwREC4'
forumTopicId: 301129
---
# --description--
通过将属性`display`的值设为`grid`,使 HTML 元素变为网格容器。通过前面的操作,你可以对该容器使用与 CSS 网格CSS Grid相关的属性。
**注意:**
在 CSS 网格中,父元素称为<dfn>容器container</dfn>,它的子元素称为<dfn>items</dfn>
# --instructions--
将类为`container`的 div 的`display`属性改为`grid`。
# --hints--
`container`类应该有`display`属性且值为`grid`。
```js
assert(code.match(/.container\s*?{[\s\S]*display\s*?:\s*?grid\s*?;[\s\S]*}/gi));
```
# --solutions--