Run
Online Code Editor
Example- Using cover value
Example of Object-fit property
Original image
object-fit: cover;