Frontend/Css

Box-sizing

필리힐리 2021. 3. 17. 12:17

width, height는 content의 크기를 지정한다 (margin, padding, border에는 영향 X)

 

Content-box

content 박스는 변하지 않고 유저가 정한 값들을 모두 더해 크기를 결정한다

 

Border-box

content 박스를 조절해 유저가 정한 width, height 기준으로 박스 크기를 조정한다

*content+padding+border

'Frontend > Css' 카테고리의 다른 글

z-index  (0) 2021.03.18
Position  (0) 2021.03.18
Inline vs Block & Display  (0) 2021.03.18
Line-height  (0) 2021.03.17
Float  (0) 2021.03.17