An Interest In:
Web News this Week
- March 31, 2024
- March 30, 2024
- March 29, 2024
- March 28, 2024
- March 27, 2024
- March 26, 2024
- March 25, 2024
February 19, 2016 01:21 pm GMT
Original Link: https://css-tricks.com/on-object-fit-and-object-position/
A Quick Overview of `object-fit` and `object-position`
object-fit
and object-position
are my two favourite CSS properties lately. They give developers control over the content inside an img
or a video
similar to the way that we can manipulate the content of a background
with background-position
and background-size
.
First, lets dig into object-fit
.
This property defines how an element, such as an img
, responds to the width and height of its content box. With object-fit
we can tell the content to fill that box in …
A Quick Overview of `object-fit` and `object-position` is a post from CSS-Tricks
Original Link: https://css-tricks.com/on-object-fit-and-object-position/
Share this article:
Tweet
View Full Article