Chinese translation of responsive-web-design (#40607)

This commit is contained in:
Xing Liu
2021-01-08 11:20:48 -08:00
committed by GitHub
parent 9770cd0f81
commit 05ba7c3482
193 changed files with 1266 additions and 1273 deletions

View File

@ -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(