Fortschrittsring conic
Fortschrittsring conic: CSS-Button. Kopiere die Regeln oder den Prompt, der das Ergebnis nachbaut.
CSS
.btn-183 {
--p: 0;
width: 64px;
height: 64px;
display: inline-grid;
place-items: center;
font: 700 13px/1 system-ui,sans-serif;
color: #1e3a8a;
background: conic-gradient(#3b82f6 calc(var(--p)*1%),#dbeafe 0);
border: 0;
border-radius: 50%;
cursor: pointer;
position: relative;
isolation: isolate;
transition: transform .2s
}
.btn-183::before {
content: "";
position: absolute;
inset: 6px;
border-radius: 50%;
background: #fff;
z-index: -1
}
.btn-183:hover {
transform: scale(1.05)
}
.btn-183:focus-visible {
outline: 2px solid #3b82f6;
outline-offset: 3px
}
.btn-183:active {
transform: scale(.97)
}
HTML
<button class="btn-183" style="--p:72" aria-label="72 percent done">72%</button>Prompt
Ein 64px runder Fortschritts-Button: ein conic-gradient Ring in Blau #3b82f6, der einen über die --p Custom Property gesetzten Prozentsatz abdeckt (ohne Einheit, z.B. 72), der Rest in blassem #dbeafe, eine weiße Innenscheibe 6px eingerückt und der Prozentwert in 13px bold #1e3a8a in der Mitte. Hover skaliert auf 1.05, Active auf 0.97. Focus: 2px blaue Outline.