我的代码看起来像这样
CSS~
div{
display:inline; <!-- this is where I need the help -->
}
a img{
margin: 5px;
box-shadow: 3px 3px 5px #000;
-moz-box-shadow: 3px 3px 5px #000;
-webkit-box-shadow: 3px 3px 5px #000;
}
.getbig{
top: 0px;
width:136px;
height:112px;
}
.bigimage{
width:100%;
height:100%;
left:15px;
top:15px;
}
html~
<div class="getbig">
<a href="../pictures2/band1.jpg" target="_blank" ><img src="../thumbnails/1.jpg" width="136" height="112" class="bigimage" alt="No Limit Texas" title="No Limit Texas"></a>
<a href="../pictures2/band4.jpg" target="_blank"><img src="../thumbnails/4.jpg" width="136" height="112" class="bigimage" alt="No Limit Texas" title="No Limit Texas"> </a>
<a href="../pictures2/band5.jpg" target="_blank"><img src="../thumbnails/5.jpg" width="136" height="112" class="bigimage" alt="No Limit Texas" title="No Limit Texas"></a>
<a href="../pictures2/band7.jpg" target="_blank"><img src="../thumbnails/7.jpg" width="136" height="112" class="bigimage" alt="No Limit Texas" title="No Limit Texas"> </a>
</div>
jQuery
$(document).ready(function(){
$('.bigimage').mouseover(function(){
$(this).stop().animate({
"width": "105%",
"height": "105%",
"left":"0px",
"top":"0px"
}, 200,'swing');
}).mouseout(function(){
$(this).stop().animate({"width": "100%","height":"100%","left":"15px","top":"15px"},200,'swing');
});;
});
所以这一切只是让图像在我将鼠标悬停在它上面时增长 5%,然后在我关闭鼠标时恢复正常。
这是我的问题:为什么,当我选择 display: inline 时,所有这些图像都会像疯了一样变大。我的问题是,当您在浏览器中显示此内容时,它们都在彼此之下,我不希望那样。我希望它们彼此相邻或像内联一样,但是当我将该 div 设置为 display:inline; 它只会让一切变得巨大。
有任何想法吗?