如何使用图像作为按钮? [英] How to use images as buttons?

查看:69
本文介绍了如何使用图像作为按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两张图片:over.png和out.png.我想在鼠标悬停按钮时显示over.png.在鼠标悬停按钮时显示out.png.单击时将显示out.png.我可以使用皮肤吗?如何?

I have two images: over.png and out.png.I want to over.png is displayed when mouse over buttons.And out.png is displayed when the mouse out button.When clicking,out.png will display.Can I use skin?How?

推荐答案

检查此链接.我想这就是你想要的.

http://kyleschaeffer.com/best-practices/pure-css-image-hover/ [ ^ ]
Check this link. I think this is what you want.

http://kyleschaeffer.com/best-practices/pure-css-image-hover/[^]


尝试一下..

Try this..

<script language="javascript" type="text/javascript">
      function mouseOver()
{
document.Button1.src ="login-button.gif"
}
function mouseOut()
{
document.Button1.src ="submit.jpg"
}
    </script>



在按钮上编写此代码

< asp:button id ="Button1" runat =服务器" text ="Button" onmouseover ="mouseOver()" onmouseout ="mouseOut()" xmlns:asp =#unknown">



on button write this code

<asp:button id="Button1" runat="server" text="Button" onmouseover="mouseOver()" onmouseout="mouseOut()" xmlns:asp="#unknown">


这篇关于如何使用图像作为按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆