Eddie
Eddie

Reputation: 59

Add Hover Effect with Images (wordpress)

What is the best solution for adding Image Transparency - Hover Effect to wordpress? I have a few company logos that I want to be fading until you hover over them....Is there an easy solution? Looking for the right code and css...thanks so much.

Upvotes: 1

Views: 7324

Answers (1)

ronakg
ronakg

Reputation: 4212

First define a class for all your company logo images like this -

<img class="company-logo" src="..."/>

Then add CSS for company-logo class like this -

img.company-logo {
    opacity: 0.5; /* Set this to whatever value you want */
    filter: alpha(opacity=50);
}

img.company-logo:hover {
    opacity: 1; /* make the images fully opaque */
    filter: alpha(opacity=100);
}

Upvotes: 2

Related Questions