Fit Sizes
These classes allows you to apply a fit size on any HTMLElement.
On image and video, uses object-fit
property, on all others,
simply fill the element using an absolute position, top: 0, left: 0 and width/height: 100%.
Preview
Fill
Loading code example. Please wait...
Cover
Loading code example. Please wait...
Contain
Loading code example. Please wait...
None
Loading code example. Please wait...
Abs
Loading code example. Please wait...
Install
CSS Classes
-
s-fit:fill
Apply the fill fit size
-
s-fit:cover
Apply the cover fit size
-
s-fit:contain
Apply the contain fit size
-
s-fit:none
Apply the none fit size
-
s-fit:abs
Apply the abs fit size