Site logo

Archived topic

Card image darken on hover

5 replies · Started by Paul on March 5, 2022

Viewing posts 1–6 of 6

Hi, how can I structure containers so only the image darkens on hover as here:
https://www.apple.com/uk/newsroom/

I know a brightness filter will produce the same effect but when I have the parent container linked I'm struggling on how to darken only the image itself.

Thanks,
Paul.

Hi there,

can you share a link to your site where you want it applied?

Hi David,

Test site is linked below.

Thanks,
Paul.

Try this CSS:

.nerccu-card:hover:before {
    filter: brightness(50%);
    transition: filter 0.3s ease-in;
}

Or if you have GB Pro you can use the Effects panel to do the same thing.

That's perfect! How do I replicate the hover only affecting the image GB Pro? I have that installed :)

This archived topic is closed to new replies.