Syntax

background-size

Setting the size of the background image.

Overview

ClassDeclarations
background-size:size,background-size: size/16rem,2279.2810169010645rem;
bg:autobackground-size: auto;
bg:coverbackground-size: cover;
bg:containbackground-size: contain;

Conditionally apply

Apply styles based on different states using selectors and applying conditionally.

<div class="background-size:10%|20:hover background-size:10%|20@sm background-size:10%|20@dark background-size:10%|20@print">…</div>

  • Master UI


© 2025 Aoyue Design LLC.MIT License
Trademark Policy