Skip to content

Font Size

用法

ClassProperties
text-xsfont-size: 0.75rem; line-height: 1rem;
text-smfont-size: 0.875rem; line-height: 1.25rem;
text-basefont-size: 1rem; line-height: 1.5rem;
text-lgfont-size: 1.125rem; line-height: 1.75rem;
text-xlfont-size: 1.25rem; line-height: 1.75rem;
text-2xlfont-size: 1.5rem; line-height: 2rem;
text-3xlfont-size: 1.875rem; line-height: 2.25rem;
text-4xlfont-size: 2.25rem; line-height: 2.5rem;
text-5xlfont-size: 3rem; line-height: 1;
text-6xlfont-size: 3.75rem; line-height: 1;
text-7xlfont-size: 4.5rem; line-height: 1;
text-8xlfont-size: 6rem; line-height: 1;
text-9xlfont-size: 8rem; line-height: 1;

对于字体来说 1 标准单位是 16px,所以对应的 0.75 为 12px, 1.5 为 24px, 在计算时要换算一下 tailwind 文字设定是包括行高的

<https://www.tailwindcss.cn/docs/font-size>

共 20 个模块,1301 篇 Markdown 文档。