Object 可控替换元素
最后更新于:2022-04-02 03:17:30
[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 | 以原始大小显示元素的内容,将其缩小以适应其容器|
实例
```
```
## 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; |
实例
```
```
';