Ugrás a fő tartalomra
← 🎨 CSS as a design system·Modul B9 · Lecke 7
FeladatBuild a 3-tier pricing layout. .pricing has display: grid, grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)), gap: var(--space-md). Each .tier has padding var(--space-lg), background var(--surface), border 1px solid var(--border), border-radius var(--radius-lg). .tier.featured has scale(1.02), border-color var(--primary), box-shadow var(--shadow-lg), position: relative. .tier.featured::before has content 'Most popular', position absolute, top: -10px, padding: 4px 12px, background: var(--primary), color: white, font-size: 11px, border-radius: var(--radius-pill). .tier h3 = plan name, .tier .price = big font-size 36px, .tier ul = features list with no list-style, .tier .cta = button. Three plans: Free, Pro $12, Team $39. Pro is featured.

Capstone 7: árképzési oldal (csíkos stílusú)

250 XP16 min
Elmélet

A pricing page that converts

Three tiers side-by-side. The middle tier — the one you want people to pick — is visually elevated: bigger, brighter border, "Most popular" ribbon, subtle drop-shadow. This isn't decoration; it's a proven conversion pattern. Users default to the tier that reads as "the sensible middle choice", and every SaaS pricing page you've seen exploits it.

Layout tricks

  • auto-fit grid — grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)). Three cards on desktop, two on tablet, one on phone. Zero media queries. If a card can't fit at least 260px, the grid drops it to the next row.
  • align-items: start on the grid so the featured card can transform: scale(1.02) without stretching the neighbours vertically.
  • Absolute-positioned ribbon — the "Most popular" chip lives at top: -10px, left: 50%, transform: translateX(-50%) so it visually punches out of the card border.

Content shape (repeat per tier)

  1. Plan name (h3).
  2. Big price (.price — 36px+).
  3. Feature list (bulleted, no default list marker — replace li::before with "✓ " in brand colour).
  4. CTA button (filled for the featured tier, outlined for the others).
🔒

Regisztrálj, hogy elkezdj programozni

Az elmélet mindenkinek nyitva. A szerkesztő, élő előnézet és ellenőrzés 7 napos ingyenes próbával nyílik meg — kártya szükséges, bármikor lemondható.

Regisztráció — ingyenes próba →

Minden útvonal első 10 leckéje ingyenes. Nem kell kártya.

← ElőzőKövetkező lecke →

Egy Python- vagy webes tipp naponta — emailben

Rövid, kézzel írt, spam nélkül. Egy kattintással leiratkozhatsz.