触发鼠标悬停 [英] trigger hover of an asp button
本文介绍了触发鼠标悬停的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何触发asp:ImageButton悬停,以便您可以更改后面的代码
例如.当我将鼠标悬停在按钮上时,我想更改图像URL.
How do you trigger asp:ImageButton hover so that you can change code behind
eg. when i hover over the button i would like the image url to change
推荐答案
在这种情况下,建议您使用Asp.Net LinkButton
加CSS
.这是一个例子
In this case I recommend you to useAsp.Net LinkButton
plus aCSS
. Here is an example
<asp:LinkButton ID="LinkButton1" runat="server CssClass="LinkButton">
这是CSS
Here is the CSS
.LinkButton
{
background:url("imagePath/imageFile.gif") top left no-repeat;
display:block;
width:32px;
height: 32px;
}
.LinkButton:hover
{
background:url("imagePath/mouseOverImageFile.gif") top left no-repeat;
display:block;
width:32px;
height: 32px;
}
这篇关于触发鼠标悬停的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文