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

Add Hover State to Images (Change Opacity + Add Text)


MayatheKay

Question

Site URL: https://www.mayakagan.com/

Hello!

I'd like to add a hover state to the images on my homepage. I created a bespoke layout but lost the hover state ability because the images are not uniform. I'm not using a gallery like masonry grid, I simply added a blank page and added images and spacers from there.

My goal is to have the title appear in the center of the image and for the image itself to fade to black (lowered opacity).

Thank you!

Link to comment
  • Answers 2
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

2 answers to this question

Recommended Posts

  • 0
18 hours ago, MayatheKay said:

Site URL: https://www.mayakagan.com/

Hello!

I'd like to add a hover state to the images on my homepage. I created a bespoke layout but lost the hover state ability because the images are not uniform. I'm not using a gallery like masonry grid, I simply added a blank page and added images and spacers from there.

My goal is to have the title appear in the center of the image and for the image itself to fade to black (lowered opacity).

Thank you!

Hi,

What is access password?

Email me if you have need any help (free, of course.). Answer within 24 hours.

How to: Setup password & share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 0
On 9/16/2021 at 1:41 AM, MayatheKay said:

Site URL: https://www.mayakagan.com/

Hello!

I'd like to add a hover state to the images on my homepage. I created a bespoke layout but lost the hover state ability because the images are not uniform. I'm not using a gallery like masonry grid, I simply added a blank page and added images and spacers from there.

My goal is to have the title appear in the center of the image and for the image itself to fade to black (lowered opacity).

Thank you!

Add to Design > Custom CSS

/* Homepage Image Hover */
body.homepage {
figure a:after {
    content: "";
    background-color: rgba(0,0,0,0.5);
    position: absolute;
    z-index: 900;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}
figcaption.image-caption-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    width: 100%;
    text-align: center;
    z-index: 9999;
    color: white;
    opacity: 0;
    pointer-events: none;
}
.image-block:hover figcaption.image-caption-wrapper {
    opacity: 1;
}
.image-block:hover figure a:after {
    opacity: 1;
}}

 

Email me if you have need any help (free, of course.). Answer within 24 hours.

How to: Setup password & share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment

Create an account or sign in to comment

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


×
×
  • Create New...