Skip to content

上下左右

定义

用于控制定位元素的位置的工具类。

工具类属性
inset-0top: 0px; right: 0px; bottom: 0px; left: 0px;
inset-autotop: auto; right: auto; bottom: auto; left: auto;
inset-x-0left: 0px; right: 0px;
inset-y-0top: 0px; bottom: 0px;
top-0top: 0px;
right-0right: 0px;
bottom-0bottom: 0px;
left-0left: 0px;
top-pxtop: 1px;
right-pxright: 1px;
bottom-pxbottom: 1px;
left-pxleft: 1px;
top-0.5top: 2px;
right-0.5right: 2px;
bottom-0.5bottom: 2px;
left-0.5left: 2px;
top-1top: 4px;
right-1right: 4px;
bottom-1bottom: 4px;
left-1left: 4px;
top-1.5top: 6px;
right-1.5right: 6px;
bottom-1.5bottom: 6px;
left-1.5left: 6px;
top-2top: 8px;
right-2right: 8px;
bottom-2bottom: 8px;
left-2left: 8px;
top-fulltop: 100%;
right-fullright: 100%;
bottom-fullbottom: 100%;
left-fullleft: 100%;
top-autotop: auto;
right-autoright: auto;
bottom-autobottom: auto;
left-autoleft: auto;

效果展示

1
2
3
4
5
6
7
8

MIT License (MIT)