Frosted profile card

css.observer·13h ago
Open in editor
body { margin: 0; min-height: 100vh; display: grid; place-items: center; font: 15px/1.5 system-ui, sans-serif;
  background: radial-gradient(circle at 20% 30%, #ff9a8b, transparent 40%), radial-gradient(circle at 80% 70%, #7f7fd5, transparent 45%), #1d1b2f; }
.card { --blur: 18px; width: 260px; padding: 28px; border-radius: 22px; text-align: center; color: #fff;
  background: rgb(255 255 255 / .12); border: 1px solid rgb(255 255 255 / .25); backdrop-filter: blur(var(--blur)) saturate(1.4); }
@supports not (backdrop-filter: blur(1px)) { .card { background: rgb(40 36 70 / .92); } }
.avatar { width: 64px; height: 64px; margin: 0 auto 12px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: #1d1b2f; font-weight: 700; }
h2 { margin: 0; font-size: 1.15rem; }
p { margin: .4rem 0 1.2rem; opacity: .8; }
a { display: inline-block; padding: .5em 1.4em; border-radius: 999px; background: #fff; color: #1d1b2f; text-decoration: none; font-weight: 600; }

Usage

The blur strength is `--blur`. Without backdrop-filter support the card gets a more opaque background.