CSS Box model

작성자

카테고리:

← 피드로
DEV Community · Jaisurya · 2026-07-27 개발(SW)

Jaisurya

In CSS, the term “box model” is used when talking about web design and layout.The CSS box model is essentially a box that wraps around every HTML element.

Every box consists of four parts: content, padding, borders and margins.

EXPLANATION

  • Content – The content of the box, where text and images appear
  • Padding – Clears an area around the content. The padding is transparent
  • Border- A border that goes around the padding and content
  • Margin – Clears an area outside the border. The margin is transparent
div{
  width: 400px;
  border: 12px solid green;
  padding: 50px;
  margin: 20px;
}

Enter fullscreen mode Exit fullscreen mode

원문에서 계속 ↗

추출 본문 · 출처: dev.to · https://dev.to/jaisurya/css-box-model-heb

코멘트

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다