Saturday, May 25, 2024
 Popular · Latest · Hot · Upcoming
159
rated 0 times [  164] [ 5]  / answers: 1 / hits: 78419  / 13 Years ago, tue, august 9, 2011, 12:00:00

First, I am a beginner. I want a step by step instruction.



I want to add a smooth background hover effect to my links in Wordpress



a {
color:#000;}
a:hover {
background-color: #d1d1d1; color:#fff;
}


I want the hover on links slow, instead of instant.
Do I need any JavaScript or jQuery ? If so, please tell me how to do that.


More From » jquery

 Answers
18

Since this is a cosmetic effect, it shouldn't be too vital that this fires. Given that, you might want to look at CSS 3 transformations.





a {
color: #000;
transition: background 0.5s linear;
}
a:hover {
background-color: #d1d1d1;
color: #fff;
}

<a href=http://example.com>Hover me</a>




[#90719] Monday, August 8, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
kieraelsies

Total Points: 718
Total Questions: 103
Total Answers: 104

Location: England
Member since Sun, May 21, 2023
1 Year ago
;