col-xs-*
class 用在 form
元素上!这样我们就可以在不关心屏幕大小的情况下,将我们的单选按钮均匀的平铺在页面上。
将你的所有单选按钮放入 <div class="row">
元素。再用 <div class="col-xs-6">
元素包裹每一个单选按钮。
记住: 提醒一句,单选按钮是 type 为 radio
的 input
元素。
row
class 的 div
元素中。
testString: assert($("div.row:has(input[type=\"radio\"])").length > 0);
- text: 每一个单选按钮应该嵌套于 div
元素之中,该 div
元素的 class 属性为 col-xs-6
。
testString: assert($("div.col-xs-6:has(input[type=\"radio\"])").length > 1);
- text: 确保所有 div
元素都有一个闭合标签。
testString: assert(code.match(/<\/div>/g) && code.match(/