Utilities 通用類別:間隔 Spacing


spacing /margin || padding

基本運用

  • padding
    • p-5(四邊都加上padding)
    • pt-1
    • pb-2
    • ps-1(padding-left)
    • pe-1(padding-right)

清除有些元素預設的例如文字向下的margin

  • mb-0即可歸零

幫按鈕加上更大的水平距離的內距

  • px-3

區塊水平置中

  • mx-auto

負值運用

  • 這個功能預設是關閉的,需要設定檔案才會開啟,學到bs5 Sass即可學習如何開啟!

Gap

  • 適合排版極其複雜的格線,大部分的網頁運用建議還是以bs5網格系統為主(display grid)
#utility spacing






你可能感興趣的文章

Next.js 入門:建立專案與專案結構

Next.js 入門:建立專案與專案結構

Day 149

Day 149

如何阻擋android原生的statusBar

如何阻擋android原生的statusBar






留言討論