object-fit属性值效果实例页面

展示

object-fit:fill

object-fit:contain

object-fit:cover

object-fit:none

object-fit:scale-down(图片尺寸足够)

object-fit:scale-down(图片尺寸小)

代码