邊學邊紀錄。
其他
- 有自動設定
border-box <img>自帶vertical-align: middle
container
分成 container 跟 container-fluid,前者是根據下圖在不同分界點設定 max-width:

後者就是永遠 100% 寬度。
如果不想設 fluid 但又想針對某些裝置做滿版,可以加上尾綴字:
1 | <div class="container-sm">576px 以下 100%</div> |
width / height
width
w-25w-50w-75w-100w-automw-100
height
h-25h-50h-75h-100h-automh-100min-vh-100vh-100
border
方向
borderborder-topborder-endborder-bottomborder-start
寬度
border border-1border border-2border border-3border border-4border border-5
圓角
roundedrounded-toprounded-endrounded-bottomrounded-startrounded-circlerounded-pill
圓角尺寸
rounded-0rounded-1rounded-2rounded-3
display
d-flexd-inline-flexd-inlined-inline-blockd-blockd-grid
Text
對齊
text-starttext-centertext-end
粗細
fw-boldfw-bolderfw-normalfw-lightfw-lighterfst-italicfst-normal
大小寫
text-lowercasetext-uppercasetext-capitalize
文字大小
fs-1fs-2fs-3fs-4fs-5fs-6
顏色

text-primarytext-secondarytext-successtext-dangertext-warningtext-infotext-lighttext-darktext-bodytext-mutedtext-whitetext-black-50text-white-50
Flex
方向
flex-rowflex-row-reverseflex-columnflex-column-reverse
主軸
justify-content-startjustify-content-endjustify-content-centerjustify-content-betweenjustify-content-aroundjustify-content-evenly
次軸
align-items-startalign-items-endalign-items-centeralign-items-baselinealign-items-stretch
子次軸
align-self-startalign-self-endalign-self-centeralign-self-baselinealign-self-stretch
收縮 / 展開
flex-grow-1flex-shrink-1
換行
flex-nowrapflex-wrap
順序
order-0order-1order-2order-3order-4order-5