div
元素。将第一个图像和h2
元素嵌套在一个<div class="row">
元素中。将您的h2
元素嵌套在<div class="col-xs-8">
并将您的图像<div class="col-xs-4">
以便它们位于同一行。请注意图像现在的大小是否适合文本? h2
元素和最顶层的img
元素都应该在带有类row
的div
元素中嵌套在一起。
testString: 'assert($("div.row:has(h2)").length > 0 && $("div.row:has(img)").length > 0, "Your h2
element and topmost img
element should both be nested together within a div
element with the class row
.");'
- text: 使用类col-xs-4
将最顶层的img
元素嵌套在div
。
testString: 'assert($("div.col-xs-4:has(img)").length > 0 && $("div.col-xs-4:has(div)").length === 0, "Nest your topmost img
element within a div
with the class col-xs-4
.");'
- text: 使用类col-xs-8
将h2
元素嵌套在div
。
testString: 'assert($("div.col-xs-8:has(h2)").length > 0 && $("div.col-xs-8:has(div)").length === 0, "Nest your h2
element within a div
with the class col-xs-8
.");'
- text: 确保每个div
元素都有一个结束标记。
testString: 'assert(code.match(/<\/div>/g) && code.match(/