Перейти к основному содержимому
← 🎨 CSS as a design system·Модуль B9 · Урок 7
ЗаданиеBuild 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: Страница цен (в стиле Stripe)

250 XP16 min
Теория

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).
🔒

Зарегистрируйся чтобы кодить

Теория открыта всем. Интерактивный редактор, живой превью и проверка открываются с 7-дневным бесплатным trial — нужна карта, отмена в любое время.

Регистрация — бесплатный trial →

Первые 10 уроков в каждом треке — бесплатные. Карта не нужна.

← НазадСледующий урок →

Получай один совет по Python или веб-разработке — каждый день в почте

Коротко, без воды, без спама. Отписаться — в один клик.