CSS3 background-size demonstration

Default setting: background-size: auto;

Absolute resize of width, retaining aspect ratio: background-size: 100px;

Absolute resize of width and height, losing aspect ratio: background-size: 100px 250px;

Resize relative to container width, retaining aspect ratio: background-size: 50% auto;

Resize relative to container height, retaining aspect ratio: background-size: auto 100%;

Image covers container, is cropped and retains aspect ratio: background-size: cover;

Image stretched to fit container dimensions and retains aspect ratio: background-size: contain;

Sizing multiple backgrounds: background-size: 240px 210px, auto, 150px;