基本样式

ClassProperties
min-w-0min-width: 0px;
min-w-1min-width: 0.25rem; /* 4px */
min-w-2min-width: 0.5rem; /* 8px */
min-w-3min-width: 0.75rem; /* 12px */
min-w-4min-width: 1rem; /* 16px */
min-w-5min-width: 1.25rem; /* 20px */
min-w-6min-width: 1.5rem; /* 24px */
min-w-7min-width: 1.75rem; /* 28px */
min-w-8min-width: 2rem; /* 32px */
min-w-9min-width: 2.25rem; /* 36px */
min-w-10min-width: 2.5rem; /* 40px */
min-w-11min-width: 2.75rem; /* 44px */
min-w-12min-width: 3rem; /* 48px */
min-w-14min-width: 3.5rem; /* 56px */
min-w-16min-width: 4rem; /* 64px */
min-w-20min-width: 5rem; /* 80px */
min-w-24min-width: 6rem; /* 96px */
min-w-28min-width: 7rem; /* 112px */
min-w-32min-width: 8rem; /* 128px */
min-w-36min-width: 9rem; /* 144px */
min-w-40min-width: 10rem; /* 160px */
min-w-44min-width: 11rem; /* 176px */
min-w-48min-width: 12rem; /* 192px */
min-w-52min-width: 13rem; /* 208px */
min-w-56min-width: 14rem; /* 224px */
min-w-60min-width: 15rem; /* 240px */
min-w-64min-width: 16rem; /* 256px */
min-w-72min-width: 18rem; /* 288px */
min-w-80min-width: 20rem; /* 320px */
min-w-96min-width: 24rem; /* 384px */
min-w-pxmin-width: 1px;
min-w-0.5min-width: 0.125rem; /* 2px */
min-w-1.5min-width: 0.375rem; /* 6px */
min-w-2.5min-width: 0.625rem; /* 10px */
min-w-3.5min-width: 0.875rem; /* 14px */
min-w-fullmin-width: 100%;
min-w-minmin-width: min-content;
min-w-maxmin-width: max-content;
min-w-fitmin-width: fit-content;

基本样式总结

1到12是连续的数字,间隔1。

12到64间隔4。

最大的是96。

关键字是 min-w。

案例:不同宽度的盒子

需求:编写一列不同宽度的盒子,使用min-w定义最小宽度,熟悉一下min-w样式类的用法。

vue3示例:

<script setup>
</script>
<template>
  <div class="flex flex-col space-y-3 bg-indigo-50">
    <div class="h-12 bg-teal-100 min-w-12 w-0"></div>
    <div class="h-12 bg-teal-200 min-w-16 w-0"></div>
    <div class="h-12 bg-teal-300 min-w-20 w-0"></div>
    <div class="h-12 bg-teal-400 min-w-24 w-0"></div>
    <div class="h-12 bg-teal-500 min-w-28 w-0"></div>
    <div class="h-12 bg-teal-600 min-w-32 w-0"></div>
    <div class="h-12 bg-teal-700 min-w-36 w-0"></div>
    <div class="h-12 bg-teal-800 min-w-40 w-0"></div>
    <div class="h-12 bg-teal-900 min-w-44 w-0"></div>
  </div>
</template>

在这里插入图片描述

点赞(0) 打赏

评论列表 共有 0 条评论

暂无评论

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部