Hi,
My menu has the colour #006699
, when hover I want it to gradually
go over to the colour #4796E9
.
Is that possible?
views:
285answers:
5
+11
A:
Yes, you can do this using jQuery. CSS Tricks has a tutorial called Color Fading Menu with jQuery here.
Philip Morton
2009-02-02 15:31:18
+1
A:
I don't think that's possible with CSS. But you can do it via javascript. Try the fadeIn effect in jquery.
Notorious2tall
2009-02-02 15:31:37
fadeIn() only affects opacity of an element, and is used to display elements otherwise hidden.
Mark W
2009-02-02 15:33:11
Mark, you're right that fadeIn would not be the right effect, but the point is that jquery will solve this problem. Thanks for the downgrade.
Notorious2tall
2009-02-02 15:41:52
A:
With JavaScript ( you can do it easy with a jQuery animate() method) or WebKit CSS animations: http://webkit.org/blog/138/css-animation/ (note that this method only works in WebKit).
I recommend the JavaScript route -- using a framework like jQuery or scriptaculous. Info on jQuery's animate method here: http://docs.jquery.com/Effects/animate
Mark W
2009-02-02 15:31:52