diff --git a/curriculum/challenges/chinese/01-responsive-web-design/basic-html-and-html5/add-a-submit-button-to-a-form.md b/curriculum/challenges/chinese/01-responsive-web-design/basic-html-and-html5/add-a-submit-button-to-a-form.md index 182f9f0b7a..e213386612 100644 --- a/curriculum/challenges/chinese/01-responsive-web-design/basic-html-and-html5/add-a-submit-button-to-a-form.md +++ b/curriculum/challenges/chinese/01-responsive-web-design/basic-html-and-html5/add-a-submit-button-to-a-form.md @@ -9,7 +9,7 @@ dashedName: add-a-submit-button-to-a-form # --description-- -让我们来给表单添加一个 `submit`(提交)按钮。点击提交按钮时,表单中的数据将会被发送到 `action` 属性指定的 URL 上。 +让我们来给表单添加一个 `submit`(提交)按钮。 点击提交按钮时,表单中的数据将会被发送到 `action` 属性指定的 URL 上。 例如: @@ -17,11 +17,11 @@ dashedName: add-a-submit-button-to-a-form # --instructions-- -请在表单(`form` 元素)底部创建一个 `button` 元素,将按钮的 `type` 属性值设置为 `submit`,内容文本为 `提交`。 +请在表单(`form` 元素)底部添加一个按钮,将按钮的 type 属性值设置为 `submit`,内容文本为“提交”。 # --hints-- -表单内部应有一个 `button` 元素。 +表单内部应有一个按钮。 ```js assert($('form').children('button').length > 0); diff --git a/curriculum/challenges/chinese/01-responsive-web-design/basic-html-and-html5/add-images-to-your-website.md b/curriculum/challenges/chinese/01-responsive-web-design/basic-html-and-html5/add-images-to-your-website.md index 44688f9a9e..d8b32f78eb 100644 --- a/curriculum/challenges/chinese/01-responsive-web-design/basic-html-and-html5/add-images-to-your-website.md +++ b/curriculum/challenges/chinese/01-responsive-web-design/basic-html-and-html5/add-images-to-your-website.md @@ -17,15 +17,15 @@ dashedName: add-images-to-your-website 注意:`img` 元素是没有结束标签的。 -所有的 `img` 元素**必须**有 `alt` 属性。`alt` 的属性值有两个作用,第一个作用是让屏幕阅读器可以知晓图片的内容,这会对网页的可访问性有很大提升;另一个作用是当图片无法加载时,页面需要显示的替代文本。 +所有的 `img` 元素**必须**有 `alt` 属性。 `alt` 的属性值有两个作用,第一个作用是让屏幕阅读器可以知晓图片的内容,这会对网页的可访问性有很大提升;另一个作用是当图片无法加载时,页面需要显示的替代文本。 -注意:如果图片是纯装饰性的,把 `alt` 的属性值设置为空是最佳实践。 +**注意:**如果图片是纯装饰性的,把 `alt` 的属性值设置为空是最佳实践。 理想情况下,`alt` 属性不应该包含特殊字符,除非有特殊需要。 让我们给上面例子的 `img` 添加 `alt` 属性。 -`一只打着领带的商务猫` +`A business cat wearing a necktie.` # --instructions-- @@ -33,11 +33,11 @@ dashedName: add-images-to-your-website 在 `main` 元素里,给 `p` 元素前面插入一个 `img` 元素。 -然后将 `src` 的属性值设置为这个 URL: +然后将 `src` 的属性值设置为这个 url: `https://bit.ly/fcc-relaxing-cat` -最后,不要忘记给图片加上 `alt` 属性。 +最后,不要忘记给 `img` 加上 `alt` 属性。 # --hints-- @@ -47,19 +47,21 @@ dashedName: add-images-to-your-website assert($('img').length); ``` -`img` 应该有一个 `src` 属性,其值为猫咪图片的 URL。 +你的图片应该有一个 `src` 属性,其值为猫咪图片的 url。 ```js assert(/^https:\/\/bit\.ly\/fcc-relaxing-cat$/i.test($('img').attr('src'))); ``` -`img` 元素的 `alt` 属性值不应为空。 +你的图片元素的 `alt` 属性值不应为空。 ```js assert( $('img').attr('alt') && $('img').attr('alt').length && - /)\S+\1\S*\/?>/.test(code.replace(/\s/g, '')) + /)\S+\1\S*\/?>/.test( + __helpers.removeWhiteSpace(code) + ) ); ``` diff --git a/curriculum/challenges/chinese/01-responsive-web-design/basic-html-and-html5/add-placeholder-text-to-a-text-field.md b/curriculum/challenges/chinese/01-responsive-web-design/basic-html-and-html5/add-placeholder-text-to-a-text-field.md index 6481478ab5..f17b99c665 100644 --- a/curriculum/challenges/chinese/01-responsive-web-design/basic-html-and-html5/add-placeholder-text-to-a-text-field.md +++ b/curriculum/challenges/chinese/01-responsive-web-design/basic-html-and-html5/add-placeholder-text-to-a-text-field.md @@ -9,7 +9,7 @@ dashedName: add-placeholder-text-to-a-text-field # --description-- -`Placeholder` 占位符是用户在 `input` 输入框中输入任何东西前的预定义文本。 +占位符文本用户在 `input` 输入框中输入任何东西前的预定义文本。 你可以像这样创建一个占位符: @@ -29,7 +29,7 @@ dashedName: add-placeholder-text-to-a-text-field assert($('input[placeholder]').length > 0); ``` -设置 `placeholder` 属性的值为 `cat photo URL`。 +设置占位符属性的值为 `cat photo URL`。 ```js assert( @@ -86,9 +86,9 @@ assert($('input[type=text]').length > 0);

CatPhotoApp

Click here to view more cat photos.

- + A cute orange cat lying on its back. - +

Things cats love:

  • cat nip
  • diff --git a/curriculum/challenges/chinese/01-responsive-web-design/basic-html-and-html5/check-radio-buttons-and-checkboxes-by-default.md b/curriculum/challenges/chinese/01-responsive-web-design/basic-html-and-html5/check-radio-buttons-and-checkboxes-by-default.md index c38142b945..f1b8d45137 100644 --- a/curriculum/challenges/chinese/01-responsive-web-design/basic-html-and-html5/check-radio-buttons-and-checkboxes-by-default.md +++ b/curriculum/challenges/chinese/01-responsive-web-design/basic-html-and-html5/check-radio-buttons-and-checkboxes-by-default.md @@ -9,23 +9,25 @@ dashedName: check-radio-buttons-and-checkboxes-by-default # --description-- -如果想设置某个单选按钮或多选按钮默认被选中,只需给 `input` 元素添加 "checked" 属性。 例如: +用 `checked` 属性把第一个复选框和单选按钮都设置为默认选中。 + +要实现以上要求,只需给 input 元素添加 "checked" 属性。 例如: `` # --instructions-- -把第一个 `radio button` 和第一个 `checkbox` 都设置为默认选中。 +把第一个单选按钮和第一个复选框都设置为默认选中。 # --hints-- -表单的第一个单选按钮应被默认选中。 +表单的第一个多选按钮应被默认选中。 ```js assert($('input[type="radio"]').prop('checked')); ``` -表单的第一个多选按钮应被默认选中。 +表单的第一个复选框应被默认选中。 ```js assert($('input[type="checkbox"]').prop('checked')); diff --git a/curriculum/challenges/chinese/01-responsive-web-design/basic-html-and-html5/comment-out-html.md b/curriculum/challenges/chinese/01-responsive-web-design/basic-html-and-html5/comment-out-html.md index 22363e65ff..27be6ed910 100644 --- a/curriculum/challenges/chinese/01-responsive-web-design/basic-html-and-html5/comment-out-html.md +++ b/curriculum/challenges/chinese/01-responsive-web-design/basic-html-and-html5/comment-out-html.md @@ -15,7 +15,7 @@ dashedName: comment-out-html # --instructions-- -任务:注释掉 `h1` 元素和 `p` 元素,保留 `h2` 元素。 +注释掉 `h1` 元素和 `p` 元素,保留 `h2` 元素。 # --hints-- diff --git a/curriculum/challenges/chinese/01-responsive-web-design/basic-html-and-html5/create-a-bulleted-unordered-list.md b/curriculum/challenges/chinese/01-responsive-web-design/basic-html-and-html5/create-a-bulleted-unordered-list.md index 7c566be11d..9f044bf161 100644 --- a/curriculum/challenges/chinese/01-responsive-web-design/basic-html-and-html5/create-a-bulleted-unordered-list.md +++ b/curriculum/challenges/chinese/01-responsive-web-design/basic-html-and-html5/create-a-bulleted-unordered-list.md @@ -11,7 +11,7 @@ dashedName: create-a-bulleted-unordered-list HTML 有一个特定的元素用于创建无序列表。 -无序列表以 `
      ` 开始,中间包含一个或多个 `
    • ` 元素,最后以 `
    ` 结束。 +无序列表以 `
      ` 开始,中间包含一个或多个 `
    • ` 元素, 最后以 `
    ` 结束。 例如: diff --git a/curriculum/challenges/chinese/01-responsive-web-design/basic-html-and-html5/link-to-external-pages-with-anchor-elements.md b/curriculum/challenges/chinese/01-responsive-web-design/basic-html-and-html5/link-to-external-pages-with-anchor-elements.md index 70ba532f8e..63f2ee74ff 100644 --- a/curriculum/challenges/chinese/01-responsive-web-design/basic-html-and-html5/link-to-external-pages-with-anchor-elements.md +++ b/curriculum/challenges/chinese/01-responsive-web-design/basic-html-and-html5/link-to-external-pages-with-anchor-elements.md @@ -11,19 +11,19 @@ dashedName: link-to-external-pages-with-anchor-elements 你可以用 `a`(Anchor,简写为 a)来实现网页间的跳转。 -`a` 需要一个 `href` 属性指向跳转的目的地,同时,它还应有内容,例如: +`a` 需要一个 `href` 属性指向跳转的目的地。 同时,它还应有内容。 例如: `链接到 freeCodeCamp` -在浏览器中,以上的标签会将文字 **"链接到 freeCodeCamp"** 展示成一个可点击的超链接。点击该文本就会跳转到 `https://freecodecamp.org`。 +在浏览器中,以上的标签会将文字 **"链接到 freeCodeCamp"** 展示成一个可点击的超链接。 点击该文本就会跳转到 **`https://freecodecamp.org`**。 # --instructions-- -创建一个内容文本为 `cat photos` 的 `a` 元素,并将其 `href` 属性值设置为 `https://freecatphotoapp.com`。 +创建一个内容文本为 “cat photos” 的 `a` 元素,并将其 `href` 属性值设置为 `https://freecatphotoapp.com`。 # --hints-- -`a` 元素的内容文本应为:`cat photos`。 +`a` 元素的锚文本应为 “cat photos”。 ```js assert(/cat photos/gi.test($('a').text())); @@ -32,7 +32,7 @@ assert(/cat photos/gi.test($('a').text())); 你的 `a` 元素应链接到 `https://freecatphotoapp.com`。 ```js -assert(/http:\/\/(www\.)?freecatphotoapp\.com/gi.test($('a').attr('href'))); +assert(/https:\/\/(www\.)?freecatphotoapp\.com/gi.test($('a').attr('href'))); ``` 确保 `a` 元素有结束标签。 @@ -66,9 +66,9 @@ assert( ```html

    CatPhotoApp

    - + A cute orange cat lying on its back. - + cat photos

    Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

    Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.