Jump to content

Image-Button Hover Animation / Fade Out and Underline

Recommended Posts

Site URL: https://www.ghostplugins.com/steps/hs83kjn7

Hey peps,

I found a pice of code I would like to use to animate my buttons.

It is supposed to look just like on ghostplugins (https://www.ghostplugins.com/steps/hs83kjn7).

And it does, except when it comes to Image-Buttons in Image Blocks. They don't change at all.

I tried changing .sqs-block-button-element--medium  to  .image-button, but the outcome is just freaky.

Can you help me please?

 

CSS Code:

// Fade Out Line Buttom - Left To Right //

.sqs-block-button-element--medium {
  position:relative;
  height: 60px;
  line-height: 60px;
  text-align: center;
  transition: 0.5s;
  padding: 0 20px;
  cursor: pointer;
  -webkit-transition:0.5s;
}

.sqs-block-button-element--medium:hover {
  background-color: transparent;
  border-color: transparent;
  color: #000000;
}
 .sqs-block-button-element--medium:hover:before{
    transition-delay: .2s;
}

.sqs-block-button-element--medium:before{
  width: 0%;
  height:100%;
  z-index: 3;
  content:'';
  position: absolute;
  bottom:-1px;
  left:0;
  box-sizing: border-box;
  transition: .2s;

}

.sqs-block-button-element--medium:hover::before {
  width: 100% !important;
  transition: .7s;
}

.sqs-block-button-element--medium:before {
  border-bottom: 2px solid #000000;
}

The part I want to change is attached (ignore the german dummy text)

 

 

Bildschirmfoto 2021-02-28 um 13.45.44.png

Link to comment
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

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.