Interactive online courses HTML Academy
2026-03-09 14:10 Diff

Another background property is background-origin. It specifies the position and dimensions of the background image display area and takes three values: padding-box, border-box, and content-box.

The default value is padding-box. When this value is set, the display area of the background image corresponds to the inner area of the block, not including the frames.

With content-box, the display area corresponds just to the content area, not including frames and padding.

With border-box, the display area matches the full size of the block, including frames. The background image starts at the outer edge of the block and is enclosed by frames, if any are specified.