Jump to content

Transition is only working on one side

Go to solution Solved by tuanphan,

Recommended Posts

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

I'm trying to add a drop shadow transition (ease) on hover for the images on my homepage. For whatever reason, it works on the images that are left-aligned, but not on the right side. Pics are attached for reference but you'll be able to see it in action on my site 🙂 Pass: WIP 

Thank you in advance!

Below is my code for the image hover:

.design-layout-overlap .image-inset { 
  transition-property: box-shadow
 } 

.design-layout-overlap .image-inset:hover {  
  box-shadow: 0px 8px 12px #E0DDDC;
  transition: .2s ease;
 } 

Screen Shot 2022-06-27 at 4.44.55 PM.png

Screen Shot 2022-06-27 at 4.45.01 PM.png

Link to comment
  • Replies 5
  • Views 349
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

On 6/30/2022 at 12:00 AM, tuanphan said:

It looks like you fixed this?

Not yet! The transition time is only reflected on left-aligned images, but not for right-aligned images.

I updated transition time to 2 seconds to make it more obvious on my website.

Thanks in advance!

Link to comment
  • Solution

Use this

.design-layout-overlap .image-inset:hover {
    box-shadow: 0px 8px 12px #e0dddc;
    transition: 2s ease !important;
}
.design-layout-overlap .image-inset {
    box-shadow: none;
    transition: 2s ease !important;
}

 

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...
On 7/7/2022 at 1:03 AM, tuanphan said:

Use this

.design-layout-overlap .image-inset:hover {
    box-shadow: 0px 8px 12px #e0dddc;
    transition: 2s ease !important;
}
.design-layout-overlap .image-inset {
    box-shadow: none;
    transition: 2s ease !important;
}

 

This worked perfectly, thank you Tuan!

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.