上下左右
定义
用于控制定位元素的位置的工具类。
| 工具类 | 属性 |
|---|---|
| inset-0 | top: 0px; right: 0px; bottom: 0px; left: 0px; |
| inset-auto | top: auto; right: auto; bottom: auto; left: auto; |
| inset-x-0 | left: 0px; right: 0px; |
| inset-y-0 | top: 0px; bottom: 0px; |
| top-0 | top: 0px; |
| right-0 | right: 0px; |
| bottom-0 | bottom: 0px; |
| left-0 | left: 0px; |
| top-px | top: 1px; |
| right-px | right: 1px; |
| bottom-px | bottom: 1px; |
| left-px | left: 1px; |
| top-0.5 | top: 2px; |
| right-0.5 | right: 2px; |
| bottom-0.5 | bottom: 2px; |
| left-0.5 | left: 2px; |
| top-1 | top: 4px; |
| right-1 | right: 4px; |
| bottom-1 | bottom: 4px; |
| left-1 | left: 4px; |
| top-1.5 | top: 6px; |
| right-1.5 | right: 6px; |
| bottom-1.5 | bottom: 6px; |
| left-1.5 | left: 6px; |
| top-2 | top: 8px; |
| right-2 | right: 8px; |
| bottom-2 | bottom: 8px; |
| left-2 | left: 8px; |
| top-full | top: 100%; |
| right-full | right: 100%; |
| bottom-full | bottom: 100%; |
| left-full | left: 100%; |
| top-auto | top: auto; |
| right-auto | right: auto; |
| bottom-auto | bottom: auto; |
| left-auto | left: auto; |
效果展示
1
2
3
4
5
6
7
8