Conic ring spin
Conic ring spin: a CSS button. Copy the rules, or the prompt that rebuilds it.
CSS
@property --a101 {
syntax: "<angle>";
inherits: false;
initial-value: 0deg
}
.btn-101 {
position: relative;
font: 600 15px/1 system-ui,sans-serif;
color: #fff;
background: #0b1020;
border: 0;
border-radius: 999px;
padding: 14px 30px;
cursor: pointer;
isolation: isolate
}
.btn-101::before {
content: "";
position: absolute;
inset: -2px;
border-radius: inherit;
background: conic-gradient(from var(--a101),#22d3ee,#a855f7,#f43f5e,#22d3ee);
z-index: -1;
animation: spin101 3s linear infinite
}
.btn-101::after {
content: "";
position: absolute;
inset: 0;
border-radius: inherit;
background: #0b1020;
z-index: -1
}
.btn-101:hover::after {
background: #141b33
}
.btn-101:focus-visible {
outline: 2px solid #a855f7;
outline-offset: 4px
}
.btn-101:active {
transform: scale(.97)
}
@keyframes spin101 {
to {
--a101: 360deg
}
}
@media (prefers-reduced-motion: reduce) {
.btn-101, .btn-101 * { animation: none; transition: none; }
}
HTML
<button class="btn-101">Launch</button>Prompt
A pill button with a 2px animated rainbow border made from a conic gradient (#22d3ee to #a855f7 to #f43f5e) rotating every 3 seconds via an @property angle, dark #0b1020 interior, white 15px semibold text, 14px by 30px padding. Hover lightens the interior to #141b33, active scales to 0.97. Focus is a 2px violet outline offset 4px.