Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0
TFNYX

Hover effect on images only not text

Question

Bedford template.

I’m using image blocks that have the overlap, collage, and card design applied to them.

I found this code that makes the whole thing grayscale and when you hover, it goes back to color.

However, I only want this affect to be applied on the images and not the headers, subtitles, and buttons.


.image-block {
 transition: filter .3s ease-in-out;
 filter: grayscale(100%);
}

.image-block:hover {
 filter: grayscale(0%);
} 


Edited by TFNYX

Share this post


Link to post

2 answers to this question

Recommended Posts

  • 1

I figured it out. Solution below:


.image-inset {
 transition: filter .3s ease-in-out;
 filter: grayscale(100%);
}

.image-inset:hover {
 filter: grayscale(0%);
} 


Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...