rollover image with buttons

2019-08-30 18:25发布

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

3条回答
beautiful°
2楼-- · 2019-08-30 18:43

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

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

查看更多
做自己的国王
3楼-- · 2019-08-30 19:01

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

查看更多
女痞
4楼-- · 2019-08-30 19:04

Try this?

<input type="image" value="someValue" src="yourImage.gif" width="widthInPixels" height="heightInPixels" onmouseover="this.src='yourImageRollover.gif';" onmouseout="this.src='yourImage.gif';"> 
查看更多
登录 后发表回答