Open
Conversation
CatcherO
reviewed
Aug 4, 2018
| } | ||
| "text": "<code>h2</code> 元素 <code>style</code> 属性的值应该以 <code>;</code> 结束。", | ||
| "testString": "assert(code.match(/<h2\\s+style\\s*=\\s*(\\'|\")\\s*color\\s*:\\s*(?:rgb\\(\\s*255\\s*,\\s*0\\s*,\\s*0\\s*\\)|rgb\\(\\s*100%\\s*,\\s*0%\\s*,\\s*0%\\s*\\)|red|#ff0000|#f00|hsl\\(\\s*0\\s*,\\s*100%\\s*,\\s*50%\\s*\\))\\s*\\;(\\'|\")>\\s*CatPhotoApp\\s*<\\/h2>/),'<code>h2</code> 元素 <code>style</code> 属性的值应该以 <code>;</code> 结束。');" | ||
|
|
S1ngS1ng
suggested changes
Aug 5, 2018
Contributor
S1ngS1ng
left a comment
There was a problem hiding this comment.
@silentsvv 这个 PR 里好像包含了之前 merge 过的 PR 的改动?你再确认下吧。可能是你没有 rebase
Contributor
Author
|
我先提交后面翻译的,我看看是啥问题。 |
S1ngS1ng
suggested changes
Aug 7, 2018
| "So, let's go ahead and import and apply a Google font (note that if Google is blocked in your country, you will need to skip this challenge).", | ||
| "To import a Google Font, you can copy the font(s) URL from the Google Fonts library and then paste it in your HTML. For this challenge, we'll import the <code>Lobster</code> font. To do this, copy the following code snippet and paste it into the top of your code editor(before the opening <code>style</code> element):", | ||
| "除了大多数系统提供的默认字体以外,我们也可以在我们的网站上使用自定义的字体。网络上有各种各样的字体,不过在这个例子中,我们将会尝试使用<code>Google</code>字体库。", | ||
| "<a href='https://fonts.google.com/' target='_blank'>Google 字体</a> 是一个免费的字体库,可以通过在 CSS 里面设置字体的 URL 来引用。", |
| "除了大多数系统提供的默认字体以外,我们也可以在我们的网站上使用自定义的字体。网络上有各种各样的字体,不过在这个例子中,我们将会尝试使用<code>Google</code>字体库。", | ||
| "<a href='https://fonts.google.com/' target='_blank'>Google 字体</a> 是一个免费的字体库,可以通过在 CSS 里面设置字体的 URL 来引用。", | ||
| "因此,下一步,我们将引入和使用<code>Google</code>字体(注意:如果你所在国家禁止使用<code>Google</code>,则可以跳过这个挑战)。", | ||
| "引入<code>Google</code>字体,你需要复制<code>Google</code>字体的 URL,并粘贴到你的 HTML 里面。在这个挑战中,我们需要引入<code>Lobster</code>字体。因此,请复制以下代码段,并粘贴到你的代码编辑器顶部。(在<code>style</code>标签之前)。", |
Contributor
There was a problem hiding this comment.
并粘贴到你的代码编辑器顶部。(在<code>style</code>标签之前)。 =>
并粘贴到你的代码编辑器顶部(<code>style</code>标签之前)。
或
并粘贴到你的代码编辑器顶部,即放到<code>style</code>标签之前。
推荐后者
| "字体名区分大小写,并且如果字体名含有空格,需要用引号括起来。例如,使用<code>\"Open Sans\"</code>字体需要添加引号,而<code>Lobster</code>字体则不需要", | ||
| "<hr>", | ||
| "Create a <code>font-family</code> CSS rule that uses the <code>Lobster</code> font, and ensure that it will be applied to your <code>h2</code> element." | ||
| "创建一个CSS规则,<code>font-family</code>属性里设置为<code>Lobster</code>字体,并确保适用于你所有的<code>h2</code>元素。" |
Contributor
There was a problem hiding this comment.
空格!
并确保适用于你所有的<code>h2</code>元素。 =>
并把这个字体应用到所有的<code>h2</code>元素。
| "There are several default fonts that are available in all browsers. These generic font families include <code>monospace</code>, <code>serif</code> and <code>sans-serif</code>", | ||
| "When one font isn't available, you can tell the browser to \"degrade\" to another font.", | ||
| "For example, if you wanted an element to use the <code>Helvetica</code> font, but degrade to the <code>sans-serif</code> font when <code>Helvetica</code> wasn't available, you will specify it as follows:", | ||
| "所有浏览器都有几种默认字体。这些通用字体包括<code>monospace</code>,<code>serif</code>和<code>sans-serif</code>", |
| "For example, if you wanted an element to use the <code>Helvetica</code> font, but degrade to the <code>sans-serif</code> font when <code>Helvetica</code> wasn't available, you will specify it as follows:", | ||
| "所有浏览器都有几种默认字体。这些通用字体包括<code>monospace</code>,<code>serif</code>和<code>sans-serif</code>", | ||
| "当字体不可用,你可以告诉浏览器通过 “降级” 去使用其他字体。", | ||
| "例如,如果你想将一个元素的字体设置成<code>Helvetica</code>,当<code>Helvetica</code>不可用时,降级使用<code>sans-serif</code>字体,可使用以下方法:", |
| { | ||
| "text": "The border around your <code>img</code> element should be green.", | ||
| "testString": "assert($(\"img\").css(\"border-left-color\") === \"rgb(0, 128, 0)\", 'The border around your <code>img</code> element should be green.');" | ||
| "text": "你<code>img</code>元素的边框颜色应该为绿色。", |
| "<hr>", | ||
| "You can specify a <code>border-radius</code> with pixels. Give your cat photo a <code>border-radius</code> of <code>10px</code>.", | ||
| "Note: this challenge allows for multiple possible solutions. For example, you may add <code>border-radius</code> to either the <code>.thick-green-border</code> class or the <code>.smaller-image</code> class." | ||
| "<code>border-radius</code>可以用<code>px</code>像素单位来赋值。 给你的猫咪图片设置 10px 的<code>border-radius</code>。", |
| { | ||
| "text": "Give your <code>div</code> element the class <code>silver-background</code>.", | ||
| "testString": "assert($(\"div\").hasClass(\"silver-background\"), 'Give your <code>div</code> element the class <code>silver-background</code>.');" | ||
| "text": "给你的<code>div</code>元素添加<code>silver-background</code>class。", |
Contributor
There was a problem hiding this comment.
你的<code>div</code>元素应有<code>silver-background</code>class。
| "However, an <code>id</code> is not reusable and should only be applied to one element. An <code>id</code> also has a higher specificity (importance) than a class so if both are applied to the same element and have conflicting styles, the styles of the <code>id</code> will be applied.", | ||
| "Here's an example of how you can take your element with the <code>id</code> attribute of <code>cat-photo-element</code> and give it the background color of green. In your <code>style</code> element:", | ||
| "通过<code>id</code>属性,你可以做一些很酷的事情,例如,就像 class 一样,你可以使用CSS来设置他们的样式", | ||
| "可是,<code>id</code>不可以重用,只应用于一个元素上。同时,在 CSS 里,<code>id</code>的优先级要高于 <code>class</code>,如果一个元素同时应用了 <code>class</code> 和 <code>id</code>,并设置样式有冲突,会优先应用 <code>id</code> 的样式。", |
| "id": "bad87fee1248bd9aedf08824", | ||
| "title": "Add Different Margins to Each Side of an Element", | ||
| "description": [ | ||
| "有时候,你会想给一个元素每个方向的<code>margin</code>都设置成一个特定的值。", |
Contributor
Author
|
已经处理好了~ @S1ngS1ng 辛苦了! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
进度10/43。