GlossQuote home中文頁面(預設)

GLOSSQUOTE LABS · BOX GEOMETRY

CSS Box Model Sizing Explorer

The same ten numbers, two sizing models. Understand declared dimensions and occupied space.

01 / Set dimensions

Padding (px, 0–100)
Borders (integer px, 0–20)

Width/height 0–600; padding up to two decimals; borders are integers. Leading zeros allowed; no signs, exponent or units. Maximum 16 raw characters per field.

Default example: compare space in both sizing modes.

content-box

Native CSS preview (actual size, locally scrollable)

Scaled schematic (not actual pixel size)

Exact dimensions (px)
content-boxW (px)H (px)

border-box

Native CSS preview (actual size, locally scrollable)

Scaled schematic (not actual pixel size)

Exact dimensions (px)
border-boxW (px)H (px)

Why is the box larger than its declared size?

content-box: declared dimensions size content, with padding and borders added outside. border-box: subtract padding and borders from the declared size, but content cannot be negative. If they exceed the declared dimension, the actual border box is still larger. Tables use exact hundredth-pixel integers; browser layout requires independent measurement.

The native box is an empty div without text, minimum size or transforms. Dark solid lines are borders, pale green is padding background, and blue is content background; tables and schematic labels also identify layers without color. The largest native box is 840×840 px and scrolls locally rather than shrinking. Only the schematic scales uniformly.

Synthetic numeric input only; no upload, storage, URL state, telemetry or Clipboard API. Language switching preserves raw/state; reload restores defaults. No other-site diagnosis, margin, percentage sizing, flex/grid or arbitrary CSS.