---
id: bad87fee1348bd9aeda08845
title: チェックボックスをレスポンシブスタイルにする
challengeType: 0
forumTopicId: 18269
required:
-
link: >-
https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.2.0/css/font-awesome.css
raw: true
dashedName: responsively-style-checkboxes
---
# --description--
Bootstrap の `col-xs-*` クラスはすべての `form` 要素に適用できるので、チェックボックスにも使用できます。 この方法では、画面解像度の幅に関係なく、チェックボックスがページ全体に等間隔で表示されます。
# --instructions--
3 つすべてのチェックボックスを `
` 要素の中に入れてください。 次に、各チェックボックスを `
` 要素の中に入れてください。
# --hints--
すべてのチェックボックスを、クラス `row` を持つ 1 つの `div` の内側に入れます。
```js
assert($('div.row:has(input[type="checkbox"])').length > 0);
```
各チェックボックスを、クラス `col-xs-4` を持つ自身の `div` の内側に入れます。
```js
assert($('div.col-xs-4:has(input[type="checkbox"])').length > 2);
```
`div` 要素にはすべて終了タグが必要です。
```js
assert(
code.match(/<\/div>/g) &&
code.match(/
/g).length === code.match(/
Things cats love:
- cat nip
- laser pointers
- lasagna
Top 3 things cats hate:
- flea treatment
- thunder
- other cats
```
# --solutions--
```html
Things cats love:
- cat nip
- laser pointers
- lasagna
Top 3 things cats hate:
- flea treatment
- thunder
- other cats
```