Countdown-Ablauf
Countdown-Ablauf: CSS-Button. Kopiere die Regeln oder den Prompt, der das Ergebnis nachbaut.
CSS
.btn-185 {
position: relative;
font: 600 14px/1 system-ui,sans-serif;
color: #0f172a;
background: #fff;
border: 1px solid #cbd5e1;
border-radius: 999px;
padding: 11px 24px;
cursor: pointer;
overflow: hidden;
isolation: isolate
}
.btn-185::before {
content: "";
position: absolute;
inset: 0;
background: #fef08a;
z-index: -1;
transform-origin: left;
animation: drain185 5s linear forwards
}
.btn-185:hover::before {
animation-play-state: paused
}
.btn-185:focus-visible {
outline: 2px solid #0f172a;
outline-offset: 3px
}
.btn-185:active {
background: #fde047
}
@keyframes drain185 {
to {
transform: scaleX(0)
}
}
@media (prefers-reduced-motion: reduce) {
.btn-185, .btn-185 * { animation: none; transition: none; }
}
HTML
<button class="btn-185">Undo</button>Prompt
Eine "Undo" Pille, die sichtbar herunterzählt: eine gelbe #fef08a Füllung hinter dem Label schrumpft über 5 Sekunden von voller Breite auf null (scaleX von links, forwards Fill), während das Zeitfenster zum Handeln sich schließt. Weiße Basis, 1px #cbd5e1 Rahmen, #0f172a 14px semibold Text, 11px mal 24px Padding. Hover pausiert den Ablauf; Active füllt #fde047. Focus: 2px dunkle Outline.