Syntax
background-size
Setting the size of the background image.
Overview
Class | Declarations |
---|---|
background-size:size,… | background-size: size/16rem,2279.2810169010645rem;
|
bg:auto | background-size: auto;
|
bg:cover | background-size: cover;
|
bg:contain | background-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>