备忘录吕吕没有备忘录十新建_尾风备忘单

备忘录吕吕没有备忘录十新建

I wrote this cheat sheet because I find myself constantly referencing the Tailwind docs to remind a particular class (I’m starting out and I don’t have muscle memory yet for it)

我写了这份备忘单,是因为我发现自己不断引用Tailwind文档来提醒特定的班级(我刚开始,还没有肌肉记忆)

Here are the things I use the most.

这是我最常使用的东西。

保证金和填充 (Margin and Padding)

Compose those 3 tables. Add a dash before the value (e.g. pt-2, m-auto)

组成这3个表。 在值之前添加破折号(例如pt-2m-auto )

SymbolDescription
pPadding
mMargin
-mNegative margin
符号 描述
p 填充
m 保证金
-m 负边距
SymbolDescription
tTop
rRight
bBottom
lLeft
xHorizontal
yVertical
符号 描述
Ť 最佳
[R
b 底部
剩下
X 卧式
ÿ 垂直
ValueDescription
00
10.25rem
20.5rem
30.75rem
41rem
51.25rem
61.5rem
82rem
102.5rem
123rem
164rem
205rem
246rem
328rem
px1px
autoauto
描述
0 0
1个 0.25rem
2 0.5rem
3 0.75rem
4 1rem
5 1.25rem
6 1.5rem
8 2rem
10 2.5rem
12 3rem
16 4rem
20 5rem
24 6rem
32 8rem
像素 1px
汽车 auto

margin: 0 auto (margin: 0 auto)

I sometimes use margin: 0 auto to center things.

我有时会使用margin: 0 auto来使内容居中。

The class mx-auto applies it.

mx-auto应用它。

宽度 (Width)

ClassCSS
w-1width: 0.25rem
w-2width: 0.5rem
w-3width: 0.75rem
w-4width: 1rem
w-6width: 1.5rem
w-8width: 2rem
w-10width: 2.5rem
w-12width: 3rem
w-16width: 4rem
w-24width: 6rem
w-32width: 8rem
w-48width: 12rem
w-64width: 16rem
w-autowidth: auto
w-pxwidth: 1px
w-12width: 50%
w-13width: 33.33333%
w-23width: 66.66667%
w-14width: 25%
w-34width: 75%
w-15width: 20%
w-25width: 40%
w-35width: 60%
w-45width: 80%
w-16width: 16.66667%
w-56width: 83.33333%
w-fullwidth: 100%
w-screenwidth: 100vw
CSS
w-1 width: 0.25rem
w-2 width: 0.5rem
w-3 width: 0.75rem
w-4 width: 1rem
w-6 width: 1.5rem
w-8 width: 2rem
w-10 width: 2.5rem
w-12 width: 3rem
16周 width: 4rem
w-24 width: 6rem
w-32 width: 8rem
w-48 width: 12rem
w-64 width: 16rem
自动 width: auto
宽像素 width: 1px
W- 二分之一 width: 50%
W- 三分之一 width: 33.33333%
W- 三分之二 width: 66.66667%
W- 四分之一 width: 25%
W- 四分之三 width: 75%
W-5 分之1 width: 20%
W- 五分之二 width: 40%
W- 五分之三 width: 60%
W- 五分之四 width: 80%
W- 六分之一 width: 16.66667%
W- 六分之五 width: 83.33333%
全满 width: 100%
屏幕 width: 100vw

最大宽度 (Max Width)

ClassCSS
max-w-xsmax-width: 20rem
max-w-smmax-width: 30rem
max-w-mdmax-width: 40rem
max-w-lgmax-width: 50rem
max-w-xlmax-width: 60rem
max-w-2xlmax-width: 70rem
max-w-3xlmax-width: 80rem
max-w-4xlmax-width: 90rem
max-w-5xlmax-width: 100rem
max-w-fullmax-width: 100%
CSS
最大wx max-width: 20rem
最大w-sm max-width: 30rem
最大宽 max-width: 40rem
最大重量 max-width: 50rem
最大w xl max-width: 60rem
最大w-2xl max-width: 70rem
最大W-3XL max-width: 80rem
最大W-4XL max-width: 90rem
最大W-5XL max-width: 100rem
最大满 max-width: 100%

最小宽度 (Min width)

ClassCSS
min-w-0min-width: 0
min-w-fullmin-width: 100%
CSS
min-w-0 min-width: 0
分钟满 min-width: 100%

字体系列 (Font Family)

ClassCSS
font-sansfont-family: system-ui, BlinkMacSystemFont, -apple-system, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
font-seriffont-family: Constantia, Lucida Bright, Lucidabright, Lucida Serif, Lucida, DejaVu Serif, Bitstream Vera Serif, Liberation Serif, Georgia, serif;
font-monofont-family: Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;
CSS
字体无 font-family: system-ui, BlinkMacSystemFont, -apple-system, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
字体衬线 font-family: Constantia, Lucida Bright, Lucidabright, Lucida Serif, Lucida, DejaVu Serif, Bitstream Vera Serif, Liberation Serif, Georgia, serif;
字体单 font-family: Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;

字体大小 (Font Size)

ClassCSS
text-xsfont-size: .75rem
text-smfont-size: .875rem
text-basefont-size: 1rem
text-lgfont-size: 1.125rem
text-xlfont-size: 1.25rem
text-2xlfont-size: 1.5rem
text-3xlfont-size: 1.875rem
text-4xlfont-size: 2.25rem
text-5xlfont-size: 3rem
CSS
文字xs font-size: .75rem
短信 font-size: .875rem
文字库 font-size: 1rem
文本lg font-size: 1.125rem
文字-xl font-size: 1.25rem
文字2xl font-size: 1.5rem
文字3xl font-size: 1.875rem
文字4xl font-size: 2.25rem
文字5xl font-size: 3rem

字型粗细 (Font weight)

ClassCSS
font-hairlinefont-weight: 100
font-thinfont-weight: 200
font-lightfont-weight: 300
font-normalfont-weight: 400
font-mediumfont-weight: 500
font-semiboldfont-weight: 600
font-boldfont-weight: 700
font-extraboldfont-weight: 800
font-blackfont-weight: 900
CSS
字体线 font-weight: 100
细字体 font-weight: 200
轻字体 font-weight: 300
字体正常 font-weight: 400
字体中等 font-weight: 500
字体半 font-weight: 600
粗体 font-weight: 700
字体扩展名 font-weight: 800
黑色字体 font-weight: 900

色彩 (Colors)

Tailwind provides us those classes we can use to match the corresponding color:

Tailwind向我们提供了可用于匹配相应颜色的那些类:

  • transparent

    transparent

  • black

    black

  • gray

    gray

  • white

    white

  • red

    red

  • orange

    orange

  • yellow

    yellow

  • green

    green

  • teal

    teal

  • blue

    blue

  • indigo

    indigo

  • purple

    purple

  • pink

    pink

Warning: gray was grey before TailWind 1.0. Keep this in mind if you have an older project around.

警告:在TailWind 1.0之前, graygrey 。 如果您的项目比较旧,请记住这一点。

Every color has various levels. You can use -100 up to -900 to make the color go from less intense to more intense:

每种颜色都有不同的水平。 您可以使用-100-900来使颜色从较低的强度变为较高的强度:

  • orange-100

    orange-100

  • orange-200

    orange-200

  • orange-300

    orange-300

  • orange-400

    orange-400

  • orange-500

    orange-500

  • orange-600

    orange-600

  • orange-700

    orange-700

  • orange-800

    orange-800

  • orange-900

    orange-900

文字颜色 (Text color)

Prepend text- to any color

在文字前text-任何颜色

背景颜色 (Background color)

Prepend bg- to any color

在任何颜色之前添加bg-

中心文字 (Center text)

Use text-center

使用text-center

线高 (Line Height)

ClassCSS
.leading-noneline-height: 1
.leading-tightline-height: 1.25
.leading-normalline-height: 1.5
.leading-looseline-height: 2
CSS
.leading-one line-height: 1
。领先 line-height: 1.25
.leading-normal line-height: 1.5
.lead-loose line-height: 2

弹性盒 (Flexbox)

容器 (Container)

ClassCSS
flexdisplay: flex
inline-flexdisplay: inline-flex
CSS
柔性 display: flex
在线弯曲 display: inline-flex

物品 (Items)

方向 (Direction)
ClassCSS
flex-rowflex-direction: row
flex-row-reverseflex-direction: row-reverse
flex-colflex-direction: column
flex-col-reverseflex-direction: column-reverse
CSS
排排 flex-direction: row
伸缩行反向 flex-direction: row-reverse
弹性col flex-direction: column
flex-col-reverse flex-direction: column-reverse
包装纸 (Wrapping)
ClassCSS
flex-no-wrapflex-wrap: nowrap
flex-wrapflex-wrap: wrap
flex-wrap-reverseflex-wrap: wrap-reverse
CSS
无缠绕 flex-wrap: nowrap
柔性包装 flex-wrap: wrap
flex-wrap-reverse flex-wrap: wrap-reverse
对齐项目 (Align items)
ClassCSS
items-stretchalign-items: stretch
items-startalign-items: flex-start
items-centeralign-items: center
items-endalign-items: flex-end
items-baselinealign-items: baseline
CSS
项目拉伸 align-items: stretch
项目开始 align-items: flex-start
物品中心 align-items: center
项目结束 align-items: flex-end
项目基准 align-items: baseline
对齐内容 (Align content)
ClassCSS
content-startalign-content: flex-start
content-centeralign-content: center
content-endalign-content: flex-end
content-betweenalign-content: space-between
content-aroundalign-content: space-around
CSS
内容开始 align-content: flex-start
内容中心 align-content: center
内容端 align-content: flex-end
内容之间 align-content: space-between
围绕内容 align-content: space-around
自我调整 (Align self)
ClassCSS
self-autoalign-self: auto
self-startalign-self: flex-start
self-centeralign-self: center
self-endalign-self: flex-end
self-stretchalign-self: stretch
CSS
自动 align-self: auto
自启动 align-self: flex-start
自我中心 align-self: center
自我终结 align-self: flex-end
自我舒展 align-self: stretch
证明内容合理 (Justify content)
ClassCSS
justify-startjustify-content: flex-start
justify-centerjustify-content: center
justify-endjustify-content: flex-end
justify-betweenjustify-content: space-between
justify-aroundjustify-content: space-around
CSS
证明开始 justify-content: flex-start
居中 justify-content: center
端到端 justify-content: flex-end
合理的 justify-content: space-between
左右对齐 justify-content: space-around
弯曲,成长,收缩 (Flex, grow, shrink)
ClassCSS
flex-initialflex: initial
flex-1flex: 1
flex-autoflex: auto
flex-noneflex: none
flex-growflex-grow: 1
flex-shrinkflex-shrink: 1
flex-no-growflex-grow: 0
flex-no-shrinkflex-shrink: 0
CSS
弹性初始 flex: initial
flex-1 flex: 1
弹性自动 flex: auto
无弹性 flex: none
弹性成长 flex-grow: 1
弯曲收缩 flex-shrink: 1
无弹性 flex-grow: 0
无收缩 flex-shrink: 0

修饰符 (Modifiers)

徘徊 (Hover)

hover:

hover:

翻译自: https://flaviocopes.com/tailwind-cheat-sheet/

备忘录吕吕没有备忘录十新建

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值