CSS Background-Size Property

CSS 1

CSS 2

CSS 3

No No Yes

Description

Specifies the size of the background images.

Syntax

background-size: [length] [percentage] | auto;

Possible values

  • [length]
  • [percentage]
  • auto

Initial Value

Auto

Applies To

All elements

Inherited

No

Media

Visual

Example

.box {
  background-size: 50% auto;
}


View All CSS Properties