Beschnittener Gradient-Rahmen
Beschnittener Gradient-Rahmen: CSS-Card. Kopiere die Regeln oder den Prompt, der das Ergebnis nachbaut.
Two backgrounds
White fills the padding box, a gradient fills the border box.
Learn howCSS
@property --card-035-a {
syntax: "<angle>";
inherits: false;
initial-value: 135deg
}
.card-035 {
width: 270px;
padding: 22px;
border: 2px solid transparent;
border-radius: 14px;
background: linear-gradient(#fff,#fff) padding-box,linear-gradient(var(--card-035-a),#f97316,#ec4899,#8b5cf6) border-box;
font-family: system-ui,sans-serif;
color: #1f2937;
transition: --card-035-a .6s
}
.card-035:hover {
--card-035-a: 315deg
}
.card-035 h3 {
margin: 0 0 6px;
font-size: 18px
}
.card-035 p {
margin: 0 0 14px;
font-size: 14px;
line-height: 1.5;
color: #6b7280
}
.card-035 a {
font-size: 13px;
font-weight: 700;
text-decoration: none;
background: linear-gradient(90deg,#f97316,#ec4899);
-webkit-background-clip: text;
background-clip: text;
color: transparent
}
.card-035 :is(a,button,input,select,textarea):focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
HTML
<article class="card-035">
<h3>Two backgrounds</h3>
<p>White fills the padding box, a gradient fills the border box.</p>
<a href="#">Learn how</a>
</article>Prompt
Erstelle eine 270px Card mit 2px Gradient-Rahmen über den background-clip Trick: ein transparenter 2px Rahmen und zwei Hintergründe, weiß auf der padding-box und ein linearer Gradient (#f97316, #ec4899, #8b5cf6) auf der border-box. Der Gradient-Winkel ist eine registrierte @property, die bei 135deg startet und beim Hover über 600ms auf 315deg wechselt. 14px Radius, 22px Padding, 18px Titel #1f2937, 14px Text #6b7280 und ein Link mit Gradient-Text (Orange zu Pink, background-clip text).