2018-10-10 18:03:03 -04:00
|
|
|
|
---
|
|
|
|
|
id: bad87fee1348bd9aec908847
|
|
|
|
|
title: Split Your Bootstrap Row
|
|
|
|
|
challengeType: 0
|
2020-09-07 16:17:39 +08:00
|
|
|
|
forumTopicId: 18306
|
|
|
|
|
localeTitle: 分割你的 Bootstrap Row
|
2018-10-10 18:03:03 -04:00
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
## Description
|
2020-09-07 16:17:39 +08:00
|
|
|
|
<section id='description'>
|
|
|
|
|
现在我们已经有了一个 Bootstrap Row,让我们把它分成两列来放置我们的元素。
|
|
|
|
|
在行内创建两个 class 属性为 <code>col-xs-6</code> 的 <code>div</code> 元素。
|
|
|
|
|
</section>
|
2018-10-10 18:03:03 -04:00
|
|
|
|
|
|
|
|
|
## Instructions
|
2020-09-07 16:17:39 +08:00
|
|
|
|
<section id='instructions'>
|
|
|
|
|
|
2018-10-10 18:03:03 -04:00
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
## Tests
|
|
|
|
|
<section id='tests'>
|
|
|
|
|
|
|
|
|
|
```yml
|
|
|
|
|
tests:
|
2020-09-07 16:17:39 +08:00
|
|
|
|
- text: "将两个 <code>div class='col-xs-6'</code> 元素内嵌入你的 <code>div class='row'</code> 元素中。"
|
2020-02-18 01:40:55 +09:00
|
|
|
|
testString: assert($("div.row > div.col-xs-6").length > 1);
|
2020-09-07 16:17:39 +08:00
|
|
|
|
- text: 确保你的 <code>div</code> 元素都有一个闭合标签。
|
2020-02-18 01:40:55 +09:00
|
|
|
|
testString: assert(code.match(/<\/div>/g) && code.match(/<div/g) && code.match(/<\/div>/g).length === code.match(/<div/g).length);
|
2018-10-10 18:03:03 -04:00
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
## Challenge Seed
|
|
|
|
|
<section id='challengeSeed'>
|
|
|
|
|
|
|
|
|
|
<div id='html-seed'>
|
|
|
|
|
|
|
|
|
|
```html
|
|
|
|
|
<div class="container-fluid">
|
|
|
|
|
<h3 class="text-primary text-center">jQuery Playground</h3>
|
|
|
|
|
<div class="row">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
## Solution
|
|
|
|
|
<section id='solution'>
|
|
|
|
|
|
2020-09-07 16:17:39 +08:00
|
|
|
|
```html
|
|
|
|
|
<div class="container-fluid">
|
|
|
|
|
<h3 class="text-primary text-center">jQuery Playground</h3>
|
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-xs-6"></div>
|
|
|
|
|
<div class="col-xs-6"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2018-10-10 18:03:03 -04:00
|
|
|
|
```
|
2020-08-13 17:24:35 +02:00
|
|
|
|
|
2020-09-07 16:17:39 +08:00
|
|
|
|
</section>
|