HTML
导入代码模板:
Utilizing object-fit: cover
If you're inclined to use background-size: cover;
as a default way of controling image sizes, consider starting with object-fit: cover;
as a first measure. It has decent support in modern browsers,
but IE and Edge are still lagging behind. Read more on CSS Tricks.
1. Thumbnails of Original Image Proportions
2. Images Controlled by object-fit: cover;