A previous professor of mine is still teaching me even though I am no longer in her class. I just learned a valuable CSS hover tip from the awesome Jennifer Campion of Interface Technical Training.
Normally in CSS when using Anchor Pseudo-classes you would have link 4 states.
- a:link (equals the unvisited link state)
- a:visited (equals the visited link state)
- a:hover (equals the mouse over/hover link state)
- a:active (equals the selected link state)
Before: two images
[Active image] 64X63
[Mouse over/Hover image] 64X63
Now: one image
[Active/Hover image all in one] 128X63
[CSS]
Notice the a#hovertest:hover on line 9 of the CSS file.
It basically means on hover jump to the 64th pixel of the horizontal position and to the 0 pixel of the vertical position. Below is the zoomed in version of the all-in-one graphic to illustrate the horizontal and vertical positions.
[Zoomed Image]
[HTML]
Video Tip In Action
1 comments:
I wrote a similar blog post about No Flicker CSS Image Hover State Trick - check it out.
Post a Comment