/g).length === code.match(/
.container-fluid的结束style
标记之后嵌套了所有HTML元素。
+ - text: 确保你已经将所有 HTML 元素内嵌在闭合的 style
标签后的 .container-fluid
元素中。
testString: assert($(".container-fluid").children().length >= 8);
```
@@ -89,7 +98,6 @@ tests:
-
```
@@ -101,8 +109,62 @@ tests:
## Solution
-```js
-// solution required
+```html
+
+
+
+
CatPhotoApp
+
+
Click here for cat photos.
+
+

+
+
Things cats love:
+
+ - cat nip
+ - laser pointers
+ - lasagna
+
+
Top 3 things cats hate:
+
+ - flea treatment
+ - thunder
+ - other cats
+
+
+
```
-/section>
+
diff --git a/curriculum/challenges/chinese/03-front-end-libraries/bootstrap/use-the-bootstrap-grid-to-put-elements-side-by-side.chinese.md b/curriculum/challenges/chinese/03-front-end-libraries/bootstrap/use-the-bootstrap-grid-to-put-elements-side-by-side.chinese.md
index 153ca2715c..e9bebd557e 100644
--- a/curriculum/challenges/chinese/03-front-end-libraries/bootstrap/use-the-bootstrap-grid-to-put-elements-side-by-side.chinese.md
+++ b/curriculum/challenges/chinese/03-front-end-libraries/bootstrap/use-the-bootstrap-grid-to-put-elements-side-by-side.chinese.md
@@ -2,15 +2,23 @@
id: bad88fee1348ce8acef08815
title: Use the Bootstrap Grid to Put Elements Side By Side
challengeType: 0
-videoUrl: ''
-localeTitle: 使用Bootstrap网格并排放置元素
+forumTopicId: 18371
+localeTitle: 使用 Bootstrap 网格并排放置元素
---
## Description
-
Bootstrap使用响应式12列网格系统,可以轻松地将元素放入行中并指定每个元素的相对宽度。 Bootstrap的大多数类都可以应用于div
元素。 Bootstrap具有不同的列宽属性,具体取决于用户屏幕的宽度。例如,手机屏幕较窄,笔记本电脑屏幕较宽。以Bootstrap的col-md-*
类为例。这里, md
表示中等, *
是指定元素应该有多少列的数字。在这种情况下,正在指定中型屏幕(例如笔记本电脑)上的元素的列宽。在我们正在构建的Cat照片应用程序中,我们将使用col-xs-*
,其中xs
表示超小(如超小型手机屏幕), *
是指示列宽多少列的列数元素应该是。通过将所有三个嵌套在一个<div class="row">
元素中,然后将它们中的每一个<div class="col-xs-4">
元素中,将Like
, Info
和Delete
按钮并排放置。 row
类应用于div
,按钮本身可以嵌套在其中。
+
+Bootstrap 具有一套基于 12 列的响应式栅格系统————可以轻松实现将多个元素放入一行并指定它们的相对宽度。 Bootstrap 的大部分 class 属性都可以应用在 div
元素上。
+Bootstrap 的列宽度属性取决于用户的屏幕宽度。 比如,手机有着窄屏幕而笔记本电脑有者更大的屏幕.
+就拿 Bootstrap 的 col-md-*
class 来说。 在这里, md
表示 medium (中等的), 而 *
是一个数字,说明了这个元素占有多少个列宽度。这个例子就是指定了中等大小屏幕(例如笔记本电脑)下元素所占的列宽度。
+在我们创建的 Cat Photo App 中,我们将使用 col-xs-*
, 其中 xs
是 extra small 的缩写 (应用于较小的屏幕,比如手机屏幕), *
是你填写的数字,代表一行中,你的元素该占多少列宽。
+将我们的 Like
, Info
和 Delete
三个按钮并排放入一个 <div class="row">
元素中,然后每个按钮都各用一个 <div class="col-xs-4">
元素包裹起来。
+当 div
元素设置了 row
class 之后,那几个按钮便会嵌入其中了。
+
## Instructions
-
+
## Tests
@@ -18,13 +26,13 @@ localeTitle: 使用Bootstrap网格并排放置元素
```yml
tests:
- - text: 您的按钮应全部嵌套在具有类row
的同一div
元素中。
+ - text: 所有按钮都需要嵌入到同一个 div
元素中, 并且该元素包含 class 属性 row
。
testString: assert($("div.row:has(button)").length > 0);
- - text: 每个Bootstrap按钮都应嵌套在自己的div
元素中,类别为col-xs-4
。
+ - text: 每个 Bootstrap 按钮都需要嵌入各自的 div
元素,并且该元素包含 class 属性 col-xs-4
。
testString: assert($("div.col-xs-4:has(button)").length > 2);
- - text: 确保每个button
元素都有一个结束标记。
+ - text: 确保每一个 button
元素都有一个闭合标签。
testString: assert(code.match(/<\/button>/g) && code.match(/
-
```
@@ -108,8 +112,67 @@ tests:
## Solution