Fix/update challenge for responsive web design principles chinese (#35918)
* Fix/update challenges for responsive-web-design-principles chinese * fix: corrected translation
This commit is contained in:
committed by
Randell Dawson
parent
ce1b1525cb
commit
8dffd3b124
@ -17,11 +17,12 @@ localeTitle: 创建媒体查询
|
||||
|
||||
```yml
|
||||
tests:
|
||||
- text: 当设备<code>height</code>小于或等于800px时,您的<code>p</code>元素的<code>font-size</code>为10px。
|
||||
testString: 'assert($("p").css("font-size") == "10px", "Your <code>p</code> element should have the <code>font-size</code> of 10px when the device <code>height</code> is less than or equal to 800px.");'
|
||||
- text: 为<code>height</code>小于或等于800px的设备声明<code>@media</code>查询。
|
||||
testString: 'assert(code.match(/@media\s*?\(\s*?max-height\s*?:\s*?800px\s*?\)/g), "Declare a <code>@media</code> query for devices with a <code>height</code> less than or equal to 800px.");'
|
||||
|
||||
testString: assert($(“style”).text().replace(/\s/g ,‘’).match(/@media\(max-height:800px\)/g), “Declare a <code>@media</code> query for devices with a <code>height</code> less than or equal to 800px.“);
|
||||
- 当设备<code> height </ code>小于或等于800px时,<code> p </ code>元素的<code> font-size </ code>应为10px.
|
||||
testString: assert($(“style”).text().replace(/\s/g ,‘’).match(/@media\(max-height:800px\){p{font-size:10px;?}}/g), “Your <code>p</code> element should have the <code>font-size</code> of 10px when the device <code>height</code> is less than or equal to 800px.“);’
|
||||
- text: 当设备<code>height</code>大于800px时,您的<code>p</code>元素的<code>font-size</code>初始值应为20px。
|
||||
testString: assert($(“style”).text().replace(/\s/g ,‘’).replace(/@media.*}/g, ‘’).match(/p{font-size:20px;?}/g), Your <code>p</code> element should have an initial <code>font-size</code> of 20px when the device <code>height</code> is more than 800px);
|
||||
```
|
||||
|
||||
</section>
|
||||
|
Reference in New Issue
Block a user