0
我在使用CSS花车做了布局:如何让我的大小调整动画(javascript)不会搞乱我的(css)“浮动”布局?
.thumb{
border-radius:20px;
border: RGB(245, 245, 220);
border-width: 10px;
border-style:solid;
float:left;
margin:20px;
padding:0px
}
然后我写了一些JavaScript来使图像与鼠标悬停扩大。
$(".thumb img").mouseover(function() {
$(this).animate({'width':204, 'height':252}, {duration:300});
}).mouseout(function(){
$(this).animate({'width':195, 'height':240}, {duration:100});
});
我想我应该预料到这会搞乱布局 - 当你永远在滚动的图像,下一行向下移动一行 - 是有办法解决这一问题?
你能提供一个你的问题的小提琴吗? –
你可以使用'transform:scale'来达到类似的效果。 – gcampbell
https://jsfiddle.net/#&togetherjs=jF02SLhz0k –