Syntax

object-fit

Setting how the content should be resized to fit its container.

Overview

ClassDeclarations
object-fit:`value`object-fit: `value`;
object-fit:noneobject-fit: none;
obj:containobject-fit: contain;
obj:coverobject-fit: cover;
obj:fillobject-fit: fill;
obj:scale-downobject-fit: scale-down;

Apply conditionally

Apply styles based on different states using selectors and conditional queries.

<div class="object-fit:fill:hover object-fit:fill@sm object-fit:fill@dark object-fit:fill@print">…</div>

  • Master UI


© 2025 Aoyue Design LLC.MIT License
Trademark Policy