position
,而是设置元素的float
属性。浮动元素从文档的正常流中移除,并推送到其包含的父元素的left
或right
。它通常与width
属性一起使用,以指定浮动元素需要多少水平空间。 section
和aside
元素彼此相邻。给#left
项float
的left
和#right
项float
的right
。 left
的元素的float
值应为left
。
testString: 'assert($("#left").css("float") == "left", "The element with id left
should have a float
value of left
.");'
- text: id为right
的元素的float
值应为right
。
testString: 'assert($("#right").css("float") == "right", "The element with id right
should have a float
value of right
.");'
```
Good stuff