rollover image with buttons

爱⌒轻易说出口 提交于 2019-12-11 23:43:02

问题


Is there a way to make a form input of type image to have a rollover image?


回答1:


Try this?

<input type="image" value="someValue" src="yourImage.gif" width="widthInPixels" height="heightInPixels" onmouseover="this.src='yourImageRollover.gif';" onmouseout="this.src='yourImage.gif';"> 



回答2:


The same way as any other image. Change the src property when the mouseover event fires.




回答3:


I would just use a normal submit input and use css sprites on it.

http://www.alistapart.com/articles/sprites



来源:https://stackoverflow.com/questions/5757714/rollover-image-with-buttons

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!