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

Fade Out Line Button for Forms and Nav Button


Daffz

Question

Hi there, 

Found this awesome code, which works brilliantly for buttons. I've been trying to see how this can also be achieved for the header nav button and form button, but can't seem to target the right class. Would be great to have all buttons looking the same. Thank you!

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

.sqs-block-button-element--small {

  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--small:hover {

  background-color: transparent !important;

  border-color: transparent !important;

  color: #000000 !important;

}

.sqs-block-button-element--small:hover:before{

    transition-delay: .2s;

}

 

.sqs-block-button-element--small::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--small:hover::before {

  width: 100% !important;

  transition: .7s;

}

 

.sqs-block-button-element--small::before {

  border-bottom: 1px solid #000000;

}

Link to comment

1 answer to this question

Recommended Posts

  • 0
On 3/30/2021 at 10:52 AM, Daffz said:

Hi there, 

Found this awesome code, which works brilliantly for buttons. I've been trying to see how this can also be achieved for the header nav button and form button, but can't seem to target the right class. Would be great to have all buttons looking the same. Thank you!

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

.sqs-block-button-element--small {

  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--small:hover {

  background-color: transparent !important;

  border-color: transparent !important;

  color: #000000 !important;

}

.sqs-block-button-element--small:hover:before{

    transition-delay: .2s;

}

 

.sqs-block-button-element--small::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--small:hover::before {

  width: 100% !important;

  transition: .7s;

}

 

.sqs-block-button-element--small::before {

  border-bottom: 1px solid #000000;

}

What is your site url

Greeting, it's BaNgan from BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Youtube Gallery for Squarespace
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. 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...