.spin-button-border {
width: fit-content !important;
padding: 2px;
border-radius: 100px;
overflow: hidden;
z-index:1;
}
.spin-button-border .elementor-widget-container::after,
.spin-button-border .elementor-button-wrapper::after {
position: absolute;
inset: 0;
z-index: -2;
opacity: 0.5;
overflow: hidden;
transition: 0.3s;
}
.spin-button-border .elementor-widget-container::before,
.spin-button-border .elementor-button-wrapper::before {
content: "";
position: absolute;
inset: -150%;
z-index: -1;
animation:
speen 4s cubic-bezier(0.56, 0.15, 0.28, 0.86) infinite;
animation-play-state: paused;
}
.spin-button-border:hover .elementor-widget-container::before,
.spin-button-border:hover .elementor-button-wrapper::before {
animation-play-state: running;
}
.spin-button-border .elementor-widget-container::before {
background: linear-gradient(90deg, #f50 30%, #0000 50%, #05f 70%);
}
.spin-button-border .elementor-button-wrapper::before {
background: linear-gradient(90deg, #f95 20%, #0000 45% 55%, #59f 80%);
}
.spin-button-border .elementor-button {
z-index: 1;
}
.spin-button-border .elementor-button-content-wrapper {
border-radius: inherit !important;
}
@keyframes speen {
0% {
rotate: 10deg;
}
50% {
rotate: 190deg;
}
to {
rotate: 370deg;
}
}
If it's to be used only once, add the CSS code in the "Custom CSS" field located in the "Advanced" tab of the widget where the CSS Class was applied. If it's to be used across multiple widgets on a single page, open "Page Settings" (gear icon) and add the CSS code in the "Custom CSS" field located in the "Advanced" tab of the "Page Settings." If it's to be used across multiple widgets on multiple pages, open "Site Settings" (sliders icon) and add the CSS code in the "Custom CSS" field located under "Custom CSS" in the "Site Settings."
.spin-button-border
Add the class in the "CSS Classes" field located in the "Advanced" tab of the Button widget
SelfMadeSystem