Hover Image For Person Addon - Question | JoomShaper
SP Page Builder 6 is Here! Learn More →

Hover Image For Person Addon

J

Jeanette

SP Page Builder 2 months ago

My client want to have a hover image for the Person addon in Pagebuilder. But as far as i can see its only possible with color as a hover. I want to ask if anyone knows how i can be able to do this even if its not possible directly in the addon. Maybe use the CSS field? If CSS will solve this, will anyone be so kind to provide me with the css code to use? Thank you in advance,

0
8 Answers
Rashida Rahman
Rashida Rahman
Accepted Answer
Support Agent 2 months ago #202040

Hi,

You are always welcome. Would you please give me your site URL here to check?

Best regards,

0
Rashida Rahman
Rashida Rahman
Accepted Answer
Support Agent 2 months ago #201988

Hi there!

Thanks for reaching out to us.

You can try the following code in your custom CSS:

.sppb-addon-person:hover .person-content-show-on-hover{
    background: url(localhost/helixultimate/images/2021/08/18/hero-img.png) !important;
}

Please replace the URL with your desired image there.

Here is a screenshot for your convenience: https://share.cleanshot.com/kF4gzfRY

Best regards,

0
J
Jeanette
Accepted Answer
2 months ago #202001

Hi Rashida and thank you so much for getting back to me.

There was some standard css in the field, but i removed it so that i could test this properly.
I can see this css swaps the image, thats good but it does not scale to fit the image into the "person addon". How do i "fix" this with css so that it fits the same way as when i upload an image into the person addon?

0
Rashida Rahman
Rashida Rahman
Accepted Answer
Support Agent 1 month ago #202954

Hello,

Hope you are doing well. Didn't hear anything back from you since then...

0
J
Jeanette
Accepted Answer
1 month ago #202966

Hi Rashida, Sorry for the late answer, i unfortunately ran sick for a while.

Please have a look at this: https://nyland.no/j5/kontakt

You can see that the display of the images are rounded. Also if you hover one of the persons the image kind of "move forward". Thats not important to do, but i like the rounded look.

When i use the suggested css instead of the one that aready are inserted i can see that i am loosing the rounded look for the images, and also that the hovered image does not fit into the image frame. If you check the woman Mona you can see whats happening.

Here is the original code for the person addon:

.optech-team-wrap {
    border-radius: 18px;
    overflow: hidden;
    transition: all 0.4s;
}

.optech-team-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.4s;
}

.person-content-show-on-hover {
    width: auto;
    height: auto;
    display: flex;
    visibility: visible;
    top: 20px;
    transition: all 0.6s;
}

.person-content-hover-content-wrap {
    padding: 0px;
    width: auto;
}

.sppb-addon-person .sppb-person-social-icons {
  margin-top: 0px;
}

.sppb-addon-person .sppb-person-social {
  margin: 0;
}

.sppb-addon-person .sppb-person-social > li {
  display: block;
}

.sppb-addon-person .sppb-person-social > li > a {
    width: 44px;
    height: 44px;
    display: flex;
    border-radius: 6px;
    align-items: center;
    transition: all 0.4s;
    justify-content: center;
    background-color: var(--white-bg);
}

.sppb-person-social > li > a:hover {
 background-color: var(--maincolor);
}

.optech-team-wrap:hover img {
    transform: scale(1.1);
}
.sppb-addon-person:hover .person-content-show-on-hover {
    left: 20px;
}

I have enclosed the login in hidden content if you want to check.

0
Rashida Rahman
Rashida Rahman
Accepted Answer
Support Agent 1 month ago #203056

Hi Jeanette,

Sorry to hear about your sickness.

Thanks for the details. Please check now, I have modified the css for woman Mona as you instructed.

Get well soon :)

0
J
Jeanette
Accepted Answer
1 month ago #203124

Hi again Rashida,

Works like a charm! Thank you so very much, this was perfect! I am very pleased :)

0
Rashida Rahman
Rashida Rahman
Accepted Answer
Support Agent 1 month ago #203158

Glad to know that and you are always welcome:)

Have a nice day!

0