Skip to content

Instantly share code, notes, and snippets.

@wpacademy
Last active January 2, 2025 20:01
Show Gist options
  • Save wpacademy/18c682bcab82ae36f0afad9a1e286f54 to your computer and use it in GitHub Desktop.
Save wpacademy/18c682bcab82ae36f0afad9a1e286f54 to your computer and use it in GitHub Desktop.
Gradient Border on Elementor Buttons with CSS
.gradient-border .elementor-button:before {
content: "";
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: -1;
/* Increase negative value for border width */
margin: -1px -2px;
/* !important */
border-radius: inherit;
/* !important */
background: linear-gradient(to bottom, #D7FAFF, #0E91A5);
}
.gradient-border.secondary .elementor-button:before {
background: linear-gradient(to bottom, #0E91A5, #D7FAFF);
}
.gradient-text {
background: linear-gradient(to bottom, #D7FAFF, #0E91A5);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment