CSS Variable 組合 String
在 ECMAScript 我們會以 Template String 或 + 組合 String,在 CSS 若以 Variable 為 String,我們也可加以組合。
在 ECMAScript 我們會以 Template String 或 + 組合 String,在 CSS 若以 Variable 為 String,我們也可加以組合。
CSS Variable 除了能用在 Numeric 外,也可使用於 Color。
CSS Variable 除了搭配 calc() 外,也可搭配其他 CSS function 使用。
CSS Variable 除了用來處理重複值外,實務上常常搭配 calc() 使用。
background Property 需搭配 url(),也可使用 CSS Variable。
水平靠右直覺會使用 Flexbox Layout 的 justify-content: flex-end,事實上也可使用 Flow Layout 的 margin-left: auto 更精簡。
水平靠左直覺會使用 Flexbox Layout 的 justify-content: flex-start,事實上也可使用 Flow Layout 的 margin-right: auto 更精簡。
水平置中直覺會使用 Flexbox Layout 的 justify-content: center,事實上也可使用 Flow Layout 的 margin: auto 更精簡。
若圖片由 API 以 Base64 String 傳回且圖片大小不一,此時 Front-end 為了美觀必須在不改變原圖比例下有相同長寬,此時可使用 CSS 的 Object Fit 與 Object Position 完成。
當多個不同高度的 inline 或 inline-block 水平並列時,可由 vertical-align 指定各 Element 該如何垂直對齊。