using a:hover to change the color of an image

后端 未结 3 1276
孤独总比滥情好
孤独总比滥情好 2021-01-22 07:39

In the following example, a mouse hover over each link changes the image:

http://www.prism.gatech.edu/~dm257/sprite.html

The trick is the following line of code:

3条回答
  •  逝去的感伤
    2021-01-22 08:24

    You absolutely can. Of course, the :visited state will only be visible upon the next load of the page. Browsers are able to determine whether or not a page has been previously accessed via header information.

    Here's a jsFiddle that demonstrates the proper declaration order with helpful comments:

    • http://jsfiddle.net/fmYdD/4/

提交回复
热议问题