CSS3浮动div的Animate布局更改

And*_*dre 6 css3 css-transitions responsive-design angularjs

在调整窗口大小时,浮动div将按预期换行到下一行.但我真的希望这个布局更改动画.

编辑:顺便说一句,找到一个不依赖于JQuery的解决方案会很高兴.如果需要,我不介意写自己的js.理想情况下,一旦我看到它工作,我想将它实现为AngularJS指令,因此我不想要jQuery依赖.

这是我的代码的缩短版本:http://jsfiddle.net/cDS7Q/3/

HTML

<div id="content">

    <div>&nbsp;</div>
    <div>&nbsp;</div>
    <div>&nbsp;</div>
    <div>&nbsp;</div>
    <div>&nbsp;</div>

</div>
Run Code Online (Sandbox Code Playgroud)

这是我的CSS

body {background-color: #333;}

#content div {
    position: relative;
    float: left;
    background-color: #eee;
    margin-left: 10px;
    margin-bottom: 10px;
    width: 100px;
    height: 100px;

    -webkit-transition: all .2s ease;
    -moz-transition: all .2s ease;
    -ms-transition: all .2s ease;
    -o-transition: all .2s ease;
    transition: all .2s ease;
}

#content {
    margin-top: 50px;
    padding-top: $gutter;
    padding-bottom: 50px;
    overflow: hidden;
    width: 100%;
}
Run Code Online (Sandbox Code Playgroud)

我试图实现的效果是这个网站的类似:http://saffron-consultants.com/journal/

调整窗口大小以查看块在其新位置中的动画效果.

rjf*_*909 0

您可以尝试使用流沙。 http://razorjack.net/quicksand/