我目前正在圖像庫中工作。除了在谷歌瀏覽器中,當您將鼠標懸停在頂部行上時,它會正常工作,下面的行將開始震動並移動。你可以找到一個工作示例here。圖片在使用jquery進行放大時懸停在Google chrome上的圖像
的HTML:
<div id="gallery">
<a href="<?php echo'?img=$imgname';?>" >
<span c
lass="title"><?php echo'$imgtitle';?></span>
<img src="http://ivojonkers.com/fotorichard/images_slider/1.jpg" />
</a>
<a href="<?php echo'?img=$imgname';?>" >
<span class="title"><?php echo'$imgtitle';?></span>
<img src="http://ivojonkers.com/fotorichard/images_slider/1.jpg" />
</a>
<a href="<?php echo'?img=$imgname';?>" >
<span class="title"><?php echo'$imgtitle';?></span>
<img src="http://ivojonkers.com/fotorichard/images_slider/1.jpg" />
</a>
<a href="<?php echo'?img=$imgname';?>" >
<span class="title"><?php echo'$imgtitle';?></span>
<img src="http://ivojonkers.com/fotorichard/images_slider/1.jpg" />
</a>
<a href="<?php echo'?img=$imgname';?>" >
<span class="title"><?php echo'$imgtitle';?></span>
<img src="http://ivojonkers.com/fotorichard/images_slider/1.jpg" />
</a>
<a href="<?php echo'?img=$imgname';?>" >
<span class="title"><?php echo'$imgtitle';?></span>
<img src="http://ivojonkers.com/fotorichard/images_slider/1.jpg" />
</a>
<a href="<?php echo'?img=$imgname';?>" >
<span class="title"><?php echo'$imgtitle';?></span>
<img src="http://ivojonkers.com/fotorichard/images_slider/1.jpg" />
</a>
<a href="<?php echo'?img=$imgname';?>" >
<span class="title"><?php echo'$imgtitle';?></span>
<img src="http://ivojonkers.com/fotorichard/images_slider/1.jpg" />
</a>
<a href="<?php echo'?img=$imgname';?>" >
<span class="title"><?php echo'$imgtitle';?></span>
<img src="http://ivojonkers.com/fotorichard/images_slider/1.jpg" />
</a>
<a href="<?php echo'?img=$imgname';?>" >
<span class="title"><?php echo'$imgtitle';?></span>
<img src="http://ivojonkers.com/fotorichard/images_slider/1.jpg" />
</a>
<a href="<?php echo'?img=$imgname';?>" >
<span class="title"><?php echo'$imgtitle';?></span>
<img src="http://ivojonkers.com/fotorichard/images_slider/1.jpg" />
</a>
</div>
的CSS
#gallery {
width: 100%;
margin-top: 100px;
padding-bottom: 100px;
display:block;
text-align:center;
}
#gallery a {
display: inline-block;
margin: 0 12.5px 25px 12.5px;
position: relative;
height:150px;
width:225px;
}
#gallery a img {
height:150px;
width:225px;
position:relative;
}
jQuery的
$(document).ready(function() {
$("#gallery a img").hover(function(){
$(this).css({"z-index":"99"});
$(this).stop(true, false).animate({ "margin-left":"-112.5px",
"margin-top":"-150px",
"bottom":"-75px",
"height":"300px",
"width":"450px"
});
}, function() {
$(this).css({"z-index":"0"});
$(this).stop(true, false).animate({"height":"150px",
"width":"225px",
"margin-left":"0px",
"margin-top":"0px",
"bottom":"0px"
});
});
});
附:如果你縮小更多,它更引人注目。
在此先感謝您的幫助。
工作正常,我在Chrome中,win8的 – aurbano
我目前對鉻的Win7上的最新版本,當你將鼠標懸停img的第一行,你可以看到底部行開始振動 – Ivo
Windows 7,最新版本的chrome,它對我很好。 –