Result Size: 300 x 150
x
 
<!DOCTYPE html>
<html>
<head>
<style>
.fill {object-fit: fill;}
.contain {object-fit: contain;}
.cover {object-fit: cover;}
.scale-down {object-fit: scale-down;}
.none {object-fit: none;}
</style>
</head>
<body>
<h1>Свойство object-fit</h1>
<h2>Нет object-fit:</h2>
<img src="../images/paris.jpg" alt="Париж" style="width:200px;height:300px">
<h2>object-fit: fill (это по умолчанию):</h2>
<img class="fill" src="../images/paris.jpg" alt="Париж" style="width:200px;height:300px">
<h2>object-fit: contain:</h2>
<img class="contain" src="../images/paris.jpg" alt="Париж" style="width:200px;height:300px">
<h2>object-fit: cover:</h2>
<img class="cover" src="../images/paris.jpg" alt="Париж" style="width:200px;height:300px">
<h2>object-fit: scale-down:</h2>
<img class="scale-down" src="../images/paris.jpg" alt="Париж" style="width:200px;height:300px">
<h2>object-fit: none:</h2>
<img class="none" src="../images/paris.jpg" alt="Париж" style="width:200px;height:300px">
</body>
</html>