Unterstrich wächst

Unterstrich wächst: CSS-Button. Kopiere die Regeln oder den Prompt, der das Ergebnis nachbaut.

underlinetext-buttonborder-drawminimal

CSS
.btn-065 {
  position: relative;
  font: 500 15px/1 system-ui,sans-serif;
  color: #111827;
  background: none;
  border: 0;
  padding: 6px 2px;
  cursor: pointer
}
.btn-065::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: #111827;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s
}
.btn-065:hover::after {
  transform: scaleX(1)
}
.btn-065:focus-visible {
  outline: 2px solid #111827;
  outline-offset: 4px
}
.btn-065:active {
  color: #4b5563
}
HTML
<button class="btn-065">Read more</button>
Prompt

Ein reiner Text-Button (15px medium, #111827, kein Hintergrund oder Rahmen, 6px mal 2px Padding) mit einem 2px Unterstrich, der sich beim Hover von links nach rechts zeichnet (scaleX 0 auf 1, Ursprung links, 250ms). Active graut den Text auf #4b5563. Fokus-Outline 2px Dunkel mit 4px Offset.