form
元素上使用Bootstrap的col-xs-*
类!这样,无论屏幕分辨率有多宽,我们的单选按钮都会均匀分布在整个页面上。将您的单选按钮嵌套在<div class="row">
元素中。然后将它们嵌套在<div class="col-xs-6">
元素中。 注意:作为提醒,单选按钮是radio
类型的input
元素。 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(/