fit property CSS Reference

Definition and Usage

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.

  • Initial valuefill
  • Applies toReplaced elements
  • InheritedYes
  • MediaVisual
  • Computed valueAs specified
  • AnimatableNo
  • CSS VersionCSS3


fit: fill | hidden | meet | slice;


No detailed information


.class {
    fit: hidden ;

Relative articles