Object Fit in CSS

.image__contain { object-fit: contain; } .image__fill { object-fit: fill; } .image__cover { object-fit: cover; } .image__scale-down { object-fit: scale-down; }
You can use object-fit which is supported by webkit and will be added to Firefox soon.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.