CSS: image link, change on hover

前端 未结 8 2178
故里飘歌
故里飘歌 2020-11-29 17:48

I have an image that is a link. I want to show a different image when the user hovers over the link.

Currently I\'m using this code:



        
8条回答
  •  死守一世寂寞
    2020-11-29 18:32

    It can be better if you set the a element in this way

    display:block;
    

    and then by css sprites set your over background

    Edit: check this example out http://jsfiddle.net/steweb/dTwtk/

提交回复
热议问题