我在Gridview中从数据库中的路径中显示了图像。现在我想以这样的方式显示图像,当用户将鼠标悬停在图像上时,图像就变大了。怎么才能做到。有什么想法请建议。
发布于 2013-10-23 06:04:14
现在在webstudio中,拖动一个HTML附加上面的图像(或者使用您自己的)。双击它并粘贴到css / javascript / html组合体中。
<img src="$thisfolderurl$ridge.gif" style="width:100px;
border:2px solid black;" onmouseover="this.style.width='400px'" onmouseout="this.style.width='100px'" alt="" title="" />发布于 2013-10-23 05:45:11
只使用css完成
give a class to that image and define a hover rule for it,在规则中,只需使图像的大小更大
.test:hover {
height:550px;
width:550px;
}就像在这个演示Fiddle里。
您可以根据需要相应地调整大小。
发布于 2013-10-23 05:48:47
为此,您应该在链接按钮上使用JQuery。
$('.lBtTempClass').mouseover(function() {
/// Do your code
});您应该添加css类到链接按钮。
<asp:LinkButton ID="lBtTempID" CssClass="lBtTempClass" runat="server" >https://stackoverflow.com/questions/19533623
复制相似问题