Chinese translation of responsive-web-design (#40607)
This commit is contained in:
@ -8,17 +8,17 @@ forumTopicId: 301128
|
||||
|
||||
# --description--
|
||||
|
||||
将元素转换为网格只会影响其子代元素。因此,在把某个子代元素设置为网格后,就会得到一个嵌套的网格。
|
||||
将元素转换为网格只会影响其子元素(即直接后代元素,英文为 `direct descendants`。意思是一个元素的所有后代元素中,父级元素为该元素的所有元素)。因此,如果我们把某个子元素设置为网格,就会得到一个嵌套的网格。
|
||||
|
||||
例如,设置类为`item3`的元素的`display`和`grid-template-columns`属性,就会得到一个嵌套的网格。
|
||||
例如,如果我们设置 class 为 `item3` 的元素的 `display` 和 `grid-template-columns` 属性,就会得到一个嵌套的网格。
|
||||
|
||||
# --instructions--
|
||||
|
||||
用`display`和`grid-template-columns`,使类为`item3`元素转换为有两列且宽度为`auto`和`1fr`的网格。
|
||||
请设置 `display` 和 `grid-template-columns`,使类为 `item3` 元素转换为有两列且宽度为 `auto` 和 `1fr` 的网格。
|
||||
|
||||
# --hints--
|
||||
|
||||
`item3`类应该有`grid-template-columns`属性且值为`auto`和`1fr`。
|
||||
class 为 `item3` 的元素应具有 `grid-template-columns` 属性且属性值应为 `auto` 和 `1fr`。
|
||||
|
||||
```js
|
||||
assert(
|
||||
@ -28,7 +28,7 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
`item3`类有`display`属性且值为`grid`。
|
||||
class 为 `item3` 的元素应具有 `display` 属性且属性值应为 `grid`。
|
||||
|
||||
```js
|
||||
assert(code.match(/.item3\s*?{[\s\S]*display\s*?:\s*?grid\s*?;[\s\S]*}/gi));
|
||||
|
Reference in New Issue
Block a user