Chinese translation of responsive-web-design (#40607)
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: bad87fee1348bd9aedf08736
|
||||
title: 给 HTML 的 Body 元素添加样式
|
||||
title: 给 HTML 的 body 元素添加样式
|
||||
challengeType: 0
|
||||
videoUrl: 'https://scrimba.com/c/cB77PHW'
|
||||
forumTopicId: 18313
|
||||
@ -8,15 +8,15 @@ forumTopicId: 18313
|
||||
|
||||
# --description--
|
||||
|
||||
现在让我们来讨论一下 CSS 继承。
|
||||
现在让我们来讨论一下 CSS 中的继承。
|
||||
|
||||
每一个 HTML 页面都含有一个`body`元素。
|
||||
每一个 HTML 页面都有一个 `body` 元素。
|
||||
|
||||
# --instructions--
|
||||
|
||||
我们可以通过设置`background-color`为`black`,来证明`body`元素的存在。
|
||||
我们可以通过设置 `background-color` 的属性值为 `black`,来证明 `body` 元素的存在。
|
||||
|
||||
添加以下的代码到`style`标签里面:
|
||||
请将以下代码添加到 `style` 标签里面:
|
||||
|
||||
```css
|
||||
body {
|
||||
@ -26,13 +26,13 @@ body {
|
||||
|
||||
# --hints--
|
||||
|
||||
`body`元素的`background-color`应该是黑色的。
|
||||
`body` 元素的 `background-color` 应为黑色。
|
||||
|
||||
```js
|
||||
assert($('body').css('background-color') === 'rgb(0, 0, 0)');
|
||||
```
|
||||
|
||||
确保 CSS 规则格式书写正确,需要开关大括号。
|
||||
确保 CSS 规则格式书写正确,左右大括号也应匹配。
|
||||
|
||||
```js
|
||||
assert(
|
||||
@ -40,7 +40,7 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
确保 CSS 规则要以分号结尾。
|
||||
确保 CSS 规则以分号结尾。
|
||||
|
||||
```js
|
||||
assert(
|
||||
|
Reference in New Issue
Block a user