Swipe left to right color change on mouseover with right to left change on mouseout
Swipe top to bottom color change on mouseover with bottom to top change on mouseout
Swipe left to right color change on mouseover with left to right change on mouseout
A gradient text color using no graphics
Swipe right to left color change on mouseover with left to right change on mouseout
Swipe right to left color change on mouseover with right to left change on mouseout
Three methods of styling a gradual change of color on hover and a method of applying a color gradient to text using just CSS.
The first and second demos use the :before pseudo class to copy the text and overlay it on hover and produce a left/right and top/bottom color change on hover. The color change reverse when the mouse is moved off the text.
The third method has a change of color for each letter and the change is delayed to give a left to right color change. When the mouse is moved off the text the change back to the original color is also left to right.
The fourth demo shows how to style text with a color gradient using just CSS. In this case the :before pseudo class is used to apply an overlay with a gradient opacity. The only downside is that the overlay color must be the same as the background color.
5th February 2013
Two additional demos added to demonstrate how to reverse the direction for each method.
Because of all the time and effort spent in producing this demonstration I would ask that you respect my copyright.
Your donations keep CSS PLAY running.
If your donation is for the use of a demo then please email me with the demo url after making your donation.