Conic Ring-Spin
Conic Ring-Spin: CSS-Button. Kopiere die Regeln oder den Prompt, der das Ergebnis nachbaut.
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
Ein Pillen-Button mit 2px animiertem Regenbogen-Rahmen aus einem Conic-Verlauf (#22d3ee über #a855f7 nach #f43f5e), der sich alle 3 Sekunden über einen @property Winkel dreht, dunkles #0b1020 Inneres, weißer Text 15px semibold, 14px mal 30px Padding. Hover hellt das Innere auf #141b33, active skaliert auf 0.97. Fokus ist eine 2px violette Outline mit 4px Offset.