多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
[TOC] ## Object Fit 用于控制可替换元素的内容如何调整大小的功能类。 | Class | Properties | 备注| | --- | --- | ---| | object-contain | object-fit: contain | 调整元素内容的大小,使其保持在容器内| | object-cover | object-fit: cover | 调整元素内容的大小以覆盖其容器| | object-fill | object-fit: fill | 拉伸元素的内容以适应其容器| | object-none | object-fit: none | 以原始大小显示元素的内容,忽略容器大小| | object-scale-down | object-fit: scale-down | 以原始大小显示元素的内容,将其缩小以适应其容器| 实例 ``` <img class="object-fill h-48 w-96 bg-blue-200" src="https://httpbin.org/image/png" alt=""> ``` ## Object Position 用于控制可替换元素的内容在其容器中的位置。 | Class| Properties | | --- | --- | | object-bottom | object-position: bottom; | | object-center | object-position: center; | | object-left | object-position: left; | | object-left-bottom | object-position: left bottom; | | object-left-top | object-position: left top; | | object-right | object-position: right; | | object-right-bottom | object-position: right bottom; | | object-right-top | object-position: right top; | | object-top | object-position: top; | 实例 ``` <img class="object-none object-right-bottom h-48 w-48 bg-blue-200" src="https://httpbin.org/image/png" alt=""> ```