-
Notifications
You must be signed in to change notification settings - Fork 4
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