ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
[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=""> ```