2014-02-27 52 views
0

我的页面有一个包含更多列和行的表。每个行和列都有一个小图像。 for循环用于调用images.i想要弹出图像悬停.. 在此先感谢..是否有可能?如何在悬停时弹出图片?

+2

定义**弹出**。 –

+0

您能否以更具体的方式描述您的需求?这个弹出图像将如何消失? – Ethen

+0

没有javascript:http://stackoverflow.com/questions/11683620/how-to-display-pop-up-text-on-mouse-hover 希望它会帮助你。 – monu

回答

0

我能想象这样的事情在这里:

$(".image").hover(function(){ 
    //display bigger image here 
}, function() { 
    //hide it here 
}); 

替代,您可以使用CSS :hover

-1

简单你可以使用像这样的jQuery的悬停功能

$('img').hover(function(){ 

    $(this).css('width' , '500px'); 
    $(this).css('height' , '500px'); 
},function(){ 

    $(this).css('width' , '200px'); 
    $(this).css('height' , '200px'); 
}) 

,这是图像的HTML代码

<div id="main_container"> 
    <div id="div1"> 
     <img src="img/angelinasmall.jpg" style="width: 200px; height: 200px;" /> 
    </div> 
    <div id="div2"> 
     <img src="img/hayden.jpg" style="width: 200px; height: 200px;" /> 
    </div> 
    <div id="div3"> 
     <img src="img/milla.jpg" style="width: 200px; height: 200px;"/> 
    </div> 
</div> 
0

$( “身体”)上( '鼠标悬停', '#image_id',函数(){

//弹出图片。

});