Skip to content

高度

固定值

通过工具类 h-* 设置高度为固定值,包含如下工具类:

工具类CSS 属性
h-0height: 0px;
h-pxheight: 1px;
h-0.5height: 2px;
h-1height: 4px;
h-1.5height: 6px;
h-2height: 8px;
h-2.5height: 10px;
h-3height: 12px;
h-3.5height: 14px;
h-4height: 16px;
h-5height: 20px;
h-6height: 24px;
h-7height: 28px;
h-8height: 32px;
h-9height: 36px;
h-10height: 40px;
h-11height: 44px;
h-12height: 48px;
h-14height: 56px;
h-16height: 64px;
h-20height: 80px;
h-24height: 96px;
h-28height: 112px;
h-32height: 128px;
h-36height: 144px;
h-40height: 160px;
h-44height: 176px;
h-48height: 192px;
h-52height: 208px;
h-56height: 224px;
h-60height: 240px;
h-64height: 256px;
h-72height: 288px;
h-80height: 320px;
h-96height: 384px;

百分比

通过工具类 h-* 设置高度为百分比,包含如下工具类:

工具类CSS 属性
h-1/2height: 50%;
h-1/3height: 33.3333333%;
h-2/3height: 66.6666667%;
h-1/4height: 25%;
h-2/4height: 50%;
h-3/4height: 75%;
h-1/5height: 20%;
h-2/5height: 40%;
h-3/5height: 60%;
h-4/5height: 80%;
h-1/6height: 16.6666667%;
h-2/6height: 33.3333333%;
h-3/6height: 50%;
h-4/6height: 66.6666667%;
h-5/6height: 83.3333333%;
h-fullheight: 100%;

特殊值

通过工具类 h-* 设置高度为特殊值,包含如下工具类:

工具类CSS 属性
h-autoheight: auto;
h-screenheight: 100vh;
h-fitheight: fit-content;
h-minheight: min-content;
h-maxheight: max-content;

限制最大高度

通过工具类 max-h-* 设置限制元素最大高度,包含如下工具类:

工具类CSS 属性
max-h-0max-height: 0px;
max-h-fullmax-height: 100%;
max-h-screenmax-height: 100vh;
max-h-nonemax-height: none;
max-h-minmax-height: min-content;
max-h-maxmax-height: max-content;
max-h-fitmax-height: fit-content;

MIT License (MIT)