Jump to content

Hover over image effects. Please help!

Go to solution Solved by tuanphan,

Recommended Posts

  • Replies 9
  • Views 1.1k
  • Created
  • Last Reply

Top Posters In This Topic

@cmiller Add this code under Website > Pages > Website Tools > Custom CSS

.image-block img {
    transition: all 1.2s ease;
}
.image-block:hover img {
    transform: scale(1.1);
    opacity: 0.7;
    transition: all 1.2s ease;
}

 

If my comments were useful, please like or mark my solution as answer so others can scroll to it quickly. 

Sam
Web Developer & Digital Designer

 Did you find my contribution helpful? Buy me a coffee?

Link to comment
5 minutes ago, cmiller said:

Thank you!  That is accomplishing what I want.  Is there a way to make exceptions so that certain photos don't respond to the cursor with the effect?

Yes, we can do that. That's why I initially asked if there's any specific image you would like to apply the hover effect to.

If my comments were useful, please like or mark my solution as answer so others can scroll to it quickly. 

Sam
Web Developer & Digital Designer

 Did you find my contribution helpful? Buy me a coffee?

Link to comment

I really appreciate that!  Currently, the photos that I would like to apply the effect to are as follows, by webpage:

 

1.  Landing:  None

2.  Home:  'Our Values' image

3.  Partner with Us:  Partnership Services carousel images - the ones with the trees and light blue backgrounds.

4.  Legal Hub (hidden from nav):  All three images

5.  Our Roots (hidden from nav):  None

6.  Resources (hidden from nav):  'Watch This Space' image

7.  Books:  All images

 

Password:  EETest2024

Link to comment
  • Solution
On 6/21/2024 at 4:34 AM, cmiller said:

I really appreciate that!  Currently, the photos that I would like to apply the effect to are as follows, by webpage:

 

1.  Landing:  None

2.  Home:  'Our Values' image

3.  Partner with Us:  Partnership Services carousel images - the ones with the trees and light blue backgrounds.

4.  Legal Hub (hidden from nav):  All three images

5.  Our Roots (hidden from nav):  None

6.  Resources (hidden from nav):  'Watch This Space' image

7.  Books:  All images

 

Password:  EETest2024

Instead of using CSS code, you can also edit each page > Add a Code Block (anywhere on page) > Then use this code

<style>
  .image-block img {
    transition: all 1.2s ease;
}
.image-block:hover img {
    transform: scale(1.1);
    opacity: 0.7;
    transition: all 1.2s ease;
}
</style>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 2 weeks later...
Posted (edited)

Thanks @Lesum @tuanphan This is exactly the question searching. Super helpful. I have two futher questions. I only want the hover treatment on my desktop and not on the mobile version of the site. Because hovering doesn't happen on phones.

Second question. Is these a way to make the hover code specific to a page section and not the entire page? Thanks, again.

Edited by MTO
corrected error
Link to comment

@MTO

#1. Change Code Block code to this

<style>
  @media screen and (min-width:768px) {
  .image-block img {
    transition: all 1.2s ease;
}
.image-block:hover img {
    transform: scale(1.1);
    opacity: 0.7;
    transition: all 1.2s ease;
    }}
</style>

#2. First, you need to find Section ID (data-section-id), next use this code

<style>
  @media screen and (min-width:768px) {
  #enter-data-section-id-here .image-block img {
    transition: all 1.2s ease;
}
#enter-data-section-id-here .image-block:hover img {
    transform: scale(1.1);
    opacity: 0.7;
    transition: all 1.2s ease;
    }}
</style>

You can follow this to find Section ID.

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

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...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.