重叠div:悬停

use*_*882 6 html css overlap hover

我有悬停和悬停时高度增长的div我希望它们与所有其他div重叠,而不是像我的例子那样推动它们.

#container{
width: 300px;
}

#container a div{
float:left;
width: 100px;
height: 60px;
-webkit-transition: all 0.25s ease;
}

#container .color1{
background: #444;
}

#container .color2{
background: #555;
}

#container .color3{
background: #666;
}

#container .color4{
background: #777;
}

#container .color5{
background: #888;
}

#container a div:hover{
height: 80px;
-webkit-transition: all 0.25s ease;
}
Run Code Online (Sandbox Code Playgroud)

http://jsfiddle.net/MrSlacker/5wa3X/

Rww*_*wwL 0

如果它们都像您的示例一样具有固定尺寸,请将它们全部绝对放置在具有相对位置的容器内;这会让他们脱离流程,并且不会推送任何其他内容。