Link-Vorschau

Link-Vorschau: CSS-Card. Kopiere die Regeln oder den Prompt, der das Ergebnis nachbaut.

link-previewogbookmarkimage-toplight

CSS
.card-054 {
  display: block;
  width: 320px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: #111827;
  font-family: system-ui,sans-serif;
  transition: box-shadow .2s,border-color .2s
}
.card-054:hover {
  border-color: #d1d5db;
  box-shadow: 0 8px 24px rgba(0,0,0,.08)
}
.card-054__img {
  display: block;
  height: 160px;
  background: linear-gradient(120deg,#0f172a,#1e40af 60%,#38bdf8)
}
.card-054__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px
}
.card-054 small {
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #6b7280
}
.card-054 b {
  font-size: 15px;
  line-height: 1.3
}
.card-054__body>span {
  font-size: 13px;
  line-height: 1.45;
  color: #4b5563;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden
}
.card-054 :is(a,button,input,select,textarea):focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
HTML
<a class="card-054" href="#">
  <span class="card-054__img"></span>
  <span class="card-054__body">
    <small>designforai.dev</small>
    <b>Design references written for AI coding tools</b>
    <span>Copy the CSS, or copy the prompt and let your editor build it.</span>
  </span>
</a>
Prompt

Baue eine 320px Link-Vorschau-Card (Open-Graph-Stil) als ein einziger Anker: weiß, 1px #e5e7eb Rahmen, 12px Radius, overflow hidden. Oben ein 160px Bildplatzhalter mit 120deg Gradient #0f172a zu #1e40af zu #38bdf8. Body 14px 16px Padding, stapelt eine 11px Versalien-Domain in #6b7280, einen 15px fetten Titel und eine 13px #4b5563 Beschreibung, per -webkit-line-clamp auf zwei Zeilen begrenzt. Beim Hover wird der Rahmen #d1d5db und ein Schatten 0 8px 24px rgba(0,0,0,.08) erscheint.