-
Notifications
You must be signed in to change notification settings - Fork 2
Tailwind CSS框架學習筆記
Bestian Tang edited this page Jun 13, 2025
·
2 revisions
-
mx
(margin-x 軸) -
my
(margin-y 軸) -
py
(padding-y 軸) -
px
(padding-x 軸)
-
container
(有寬度上限的容器)
RWD 設計是窄的優先(mobile first)。
例如,如果寫:
md:mx-auto
在 md
、lg
、xl
、2xl
都會套用 mx-auto
,除非更寬的部分有另外宣告其他的 margin 值。
-
text-center
置中 -
text-left
置左 -
text-xl
大字 -
text-blue-800
藍字
-
sm
約為手機寬度(註:Tailwind 無xs
) -
md
約為平板寬度 -
lg
約為筆電寬度 -
xl
約為桌電寬度 -
2xl
約為大螢幕寬度
flex flex-col md:flex-row
會在 sm
以下為直排(flex column),md
以上為橫排(flex row)。
- Flexbox(英文發音, 15min): https://www.youtube.com/watch?v=fYq5PXgSsbE
- Tailwinda簡介(中文發音, 27min):https://www.youtube.com/watch?v=HYQ0SzWHM7I