Highlight-Sweep
Highlight-Sweep: CSS-Button. Kopiere die Regeln oder den Prompt, der das Ergebnis nachbaut.
CSS
@property --a105 {
syntax: "<angle>";
inherits: false;
initial-value: 0deg
}
.btn-105 {
position: relative;
font: 600 14px/1 system-ui,sans-serif;
letter-spacing: .02em;
color: #f8fafc;
background: #1e293b;
border: 0;
border-radius: 12px;
padding: 13px 26px;
cursor: pointer;
isolation: isolate
}
.btn-105::before {
content: "";
position: absolute;
inset: -1.5px;
border-radius: 13px;
background: conic-gradient(from var(--a105),#475569 0 40%,#f8fafc 50%,#475569 60% 100%);
z-index: -1;
animation: sweep105 2.5s linear infinite;
animation-play-state: paused
}
.btn-105::after {
content: "";
position: absolute;
inset: 0;
border-radius: inherit;
background: #1e293b;
z-index: -1
}
.btn-105:hover::before {
animation-play-state: running
}
.btn-105:focus-visible {
outline: 2px solid #f8fafc;
outline-offset: 3px
}
.btn-105:active::after {
background: #0f172a
}
@keyframes sweep105 {
to {
--a105: 360deg
}
}
@media (prefers-reduced-motion: reduce) {
.btn-105, .btn-105 * { animation: none; transition: none; }
}
HTML
<button class="btn-105">Continue</button>Prompt
Ein Schiefer #1e293b Button, 12px Radius, cremeweißer #f8fafc Text 14px semibold, 13px mal 26px Padding, mit einem 1.5px Rahmen in #475569 bis auf einen hellen #f8fafc Highlight-Keil. Der Keil fegt nur beim Hover um die Kante (2.5s pro Runde), über animation-play-state paused/running auf einem @property Winkel. Active dunkelt das Innere auf #0f172a; Fokus 2px weiße Outline mit 3px Offset.