【发布时间】:2013-08-16 11:24:35
【问题描述】:
我有多个相邻的 div 元素使用 float:left。现在,当一些 div 元素被 jQuery 使用fadeOut() 隐藏时,我希望其余的 div 使用 CSS 过渡动画向左移动。目前,他们只是跳过那里。
这是一个小例子:
<div>
<div id="a" style="float:left;width:50px;height:50px">
<div id="b" style="float:left;width:50px;height:50px">
<div id="c" style="float:left;width:50px;height:50px">
<div id="d" style="float:left;width:50px;height:50px">
<div id="e" style="float:left;width:50px;height:50px">
<div id="f" style="float:left;width:50px;height:50px">
</div>
现在,当调用 c.fadeOut() 时:d、e、f 应该向左移动。我怎样才能做到这一点?
【问题讨论】:
标签: javascript css