--- id: bad87fee1348bd9aedb08845 title: Responsively Style Radio Buttons required: - link: 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.2.0/css/font-awesome.css' raw: true challengeType: 0 videoUrl: '' localeTitle: 响应样式单选按钮 --- ## Description
您也可以在form元素上使用Bootstrap的col-xs-*类!这样,无论屏幕分辨率有多宽,我们的单选按钮都会均匀分布在整个页面上。将您的单选按钮嵌套在<div class="row">元素中。然后将它们嵌套在<div class="col-xs-6">元素中。 注意:作为提醒,单选按钮是radio类型的input元素。
## Instructions
## Tests
```yml tests: - text: 将所有单选按钮div具有类row一个div 。 testString: 'assert($("div.row:has(input[type=\"radio\"])").length > 0, "Nest all of your radio buttons inside one div with the class row.");' - text: 使用类col-xs-6将每个单选按钮嵌套在自己的div 。 testString: 'assert($("div.col-xs-6:has(input[type=\"radio\"])").length > 1, "Nest each of your radio buttons inside its own div with the class col-xs-6.");' - text: 确保每个div元素都有一个结束标记。 testString: 'assert(code.match(/<\/div>/g) && code.match(/
/g).length === code.match(/
div elements has a closing tag.");' ```
## Challenge Seed
```html

CatPhotoApp

A cute orange cat lying on its back.
Three kittens running towards the camera.

Things cats love:

  • cat nip
  • laser pointers
  • lasagna

Top 3 things cats hate:

  1. flea treatment
  2. thunder
  3. other cats
```
## Solution
```js // solution required ```