How to create object fit property using css

How to create an object-fit property using CSS

In this article, you will learn How to create an object-fit property using CSS. Example:- <html> <head> <title>Object fit property</title> <style> .fill{ object-fit: fill; } .contain{ object-fit: contain; } .cover{ object-fit: cover; } .scale-down{ object-fit: scale-down; } .none{ object-fit: none; } h1,h2{ text-align:center; } </style> </head> <body> <h1>object-fit Property</h1> <h2>No object-fit:</h2> <img src="image.jpg" alt="image" style="width:200px;height:400px"> […]
Read Full Article