CSS Fit Property

CSS 1

CSS 2

CSS 3

No No Yes

Description

The 'fit' property gives a hint for how to scale a replaced element if neither its 'width' nor its 'height' property is 'auto'. Not all replaced objects can be scaled, but images typically can.

Syntax

fit: [value];

Possible values

  • fill
  • hidden
  • meet
  • slice

Initial Value

fill

Applies To

Replaced elements

Inherited

Yes

Media

Visual

Example

.class {
  fit: hidden ;
}


View All CSS Properties