Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
February 19, 2016 01:21 pm GMT

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:    Share on Facebook
View Full Article

CSS Tricks

A Web Design Community curated by Chris Coyier

More About this Source Visit CSS Tricks