Line-height Calculator

Convert design line spacing (px) to line-height multiplier.

Về công cụ này

This tool converts design leading (px) to line-height multiplier in one click. Three features: 1) Enter font size (px) and desired line spacing (px) for multiplier, 2) Convert design specs to CSS, 3) Useful for typography line spacing design.

Giao diện công cụ

line-height (hệ số)
CSS

Cách sử dụng

  1. Enter font size (px) and desired line spacing (px)
  2. line-height multiplier is calculated instantly
  3. Use result for CSS line-height property

Khi nào nên dùng

Converting design specs to CSS, typography line spacing.

Ví dụ

16px font, 24px spacing → line-height: 1.5

Câu hỏi thường gặp

What does unitless line-height mean?

Multiplier of font size. 1.5 = 1.5× font height. Inherits relatively.

Line spacing vs line-height?

Same concept. Design uses 'leading', CSS uses line-height. spacing ÷ font-size = multiplier.

Recommended line-height?

Body 1.5–1.8. Headings 1.2–1.4. This tool converts design leading (px) to multiplier.

How to calculate line-height from px?

Desired line height (px) ÷ font size (px) = multiplier. E.g. 24px ÷ 16px = 1.5.

What is line-height: normal?

Browser default (~1.2). Varies by font. Better to set explicitly.

Typography line spacing tips?

Body 1.5–1.8 for readability. Headings 1.2–1.4. This tool converts px leading to multiplier.

What is design leading?

Line-to-line spacing. In Figma/Illustrator as 'leading'. Convert px to line-height multiplier.

Inherit line-height?

Unitless (1.5) inherits relatively. px is fixed. Prefer unitless for scaling.

Align multi-line text spacing?

Use same line-height multiplier. Consistent visual spacing across font sizes.

How to use line-height calculator?

Enter font size (px) and desired line spacing (px). Get line-height multiplier instantly.

Line-height Calculator miễn phí không?

Miễn phí, không cần đăng ký.

Dữ liệu có gửi lên server?

Dữ liệu ở trên thiết bị; chúng tôi không lưu trên máy chủ.

Trình duyệt hỗ trợ?

Đã kiểm tra trên Chrome, Edge, Firefox, Safari bản mới.

Dùng offline được không?

Sau lần tải đầu, hầu hết tính năng hoạt động khi mạng không ổn định.

Khác CLI/desktop app?

Line-height Calculator là công cụ trực tuyến không cần cài, thay thế CLI hoặc app desktop.

Khi nào dùng?

Dùng khi: Converting design specs to CSS, typography line spacing.

Ví dụ sử dụng?

Ví dụ: 16px font, 24px spacing → line-height: 1.5

Tính năng chính?

px spacing → multiplier, Font size based, Instant calculation

Phân biệt với công cụ tương tự?

Line-height Calculator chạy trên trình duyệt, không cần cài. Dùng khi cần thử nhanh trước khi chuyển sang CLI.

Từ khóa tìm kiếm

行間, CSS, line-height, フォント, 計算

Quy trình sử dụng cơ bản

  1. Enter font size (px) and desired line spacing (px)
  2. line-height multiplier is calculated instantly
  3. Use result for CSS line-height property

Tình huống sử dụng

  • Converting design specs to CSS, typography line spacing.
  • This tool converts design leading (px) to line-height multiplier in one click. Three features: 1) Enter font size (px) and desired line spacing (px) for multiplier, 2) Convert design specs to CSS, 3) Useful for typography line spacing design.
  • px spacing → multiplier
  • Font size based

Quyền riêng tư & dữ liệu

Dữ liệu ở trên thiết bị; chúng tôi không lưu trên máy chủ.

Lưu ý

  • Luôn kiểm tra lại trước khi dán kết quả lên production
  • Thử cửa sổ ẩn danh nếu extension gây lỗi
  • Đợi xử lý xong khi nhập dữ liệu lớn

Nội dung học liên quan

Công cụ liên quan

Bộ công cụ