This is actually expected behavior for all browsers: while the body
element is indeed being offset 100 pixels from the top, the background itself is being seamlessly propagated to the viewport as described in the first part of this answer. It's probably a holdover from the era of HTML presentational attributes, where setting background attributes on body
allowed the background to be propagated to the viewport, giving an appearance of applying a background to the whole page.
If you want to restrict the background to only the body
element, simply give html
a background color that is anything other than transparent
, or give it a background image. The viewport will then use the background of html
instead.