Files
2nd/10_Wiki/Topic_Programming/Topic_CSS/CSS_Background_Clip.md
T
Antigravity Agent e9cbf23ab5 docs(10_Wiki): Dev 폴더 누락분 반영 — Topic_Programming으로 통합
이전 재구성 작업에서 Dev/ 폴더가 누락되었던 것을 반영.

- Dev/Topic_Programming(중첩 폴더, 78개)은 Dev 자체 최상위 폴더들
  (Architecture/Conventions/Engineering_Intelligence 등)과 완전 중복이라 제거.
- Dev 최상위 엔지니어링 지식 폴더(Architecture/Conventions/Engineering_Intelligence/
  Failure_Library/Generalized_Principles/Language/Pattern_Catalog/Platform_Guides/
  Subsystems, 77개)는 이미 Topic_Programming/Topic_Programming에 더 최신 버전이
  존재해 중복 제거(고유 콘텐츠 1개는 예외 처리하여 이동 보존).
- Dev의 W3Schools 언어 튜토리얼 폴더(Topic_C/CPP/CSS/CSharp/HOWTO/HTML/Java/
  JavaScript/PHP/Python/SQL/W3CSS, 1201개)는 전부 Topic_Programming 하위로 이동.
- 에이전트 운영 상태(.astra/docs)는 그대로 유지, 콘텐츠 폴더만 정리.
- Topic_Programming 최종 문서 수: 2784 → 3985.
2026-07-05 00:39:13 +09:00

5.8 KiB

id, title, category, status, verification_status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, created_at, updated_at, review_reason, merge_history, tags, raw_sources, applied_in, github_commit
id title category status verification_status canonical_id aliases duplicate_of source_trust_level confidence_score created_at updated_at review_reason merge_history tags raw_sources applied_in github_commit
css-background-clip CSS Background Clip Frontend draft conceptual
background-clip
background painting area
border-box clip
padding-box clip
content-box clip
background extent
B 0.88 2026-06-23 2026-06-23
css
web
frontend
w3schools
background
background-clip
https://www.w3schools.com/css/css3_background_clip.asp

CSS Background Clip

🎯 한 줄 통찰 (One-line insight)

The background-clip property defines how far the background (color, image, or gradient) extends within an element — behind the border (default), to the inside edge of the border, or only to the content box. [S1]

🧠 핵심 개념 (Core concepts)

  • background-clip — defines how far the background (color, image, or gradient) should extend within an element. [S1]
  • border-box — the background extends behind the border; this is the default. [S1]
  • padding-box — the background extends to the inside edge of the border. [S1]
  • content-box — the background extends to the edge of the content box. [S1]
  • Applies to color and image — the same values work whether the background is a color or an image. [S1]

🧩 추출된 패턴 (Extracted patterns)

  • Clip-extent pattern — the value sets the outer boundary of the painted area: border-boxpadding-boxcontent-box progressively shrinks where the background shows. [S1]
  • Border-reveal pattern — with a dotted/transparent border, switching to padding-box or content-box makes the background stop short of (and reveal gaps in) the border area. [S1]

📖 세부 내용 (Details)

CSS background-clip Property The background-clip property defines how far the background (color, image, or gradient) should extend within an element. [S1]

The property takes three different values: [S1]

  • border-box — the background extends behind the border. This is default. [S1]
  • padding-box — the background extends to the inside edge of the border. [S1]
  • content-box — the background extends to the edge of the content box. [S1]

Example — background-clip with a background image: [S1]

#div1 {
  border: 5px dotted black;
  padding: 35px;
  background-image: url(paper.gif);
  background-clip: border-box;
}

#div2 {
  border: 5px dotted black;
  padding: 35px;
  background-image: url(paper.gif);
  background-clip: padding-box;
}

#div3 {
  border: 5px dotted black;
  padding: 35px;
  background-image: url(paper.gif);
  background-clip: content-box;
}

Example — background-clip with a background color: [S1]

#div1 {
  border: 5px dotted black;
  padding: 35px;
  background-color: lightblue;
  background-clip: border-box;
}

#div2 {
  border: 5px dotted black;
  padding: 35px;
  background-color: lightblue;
  background-clip: padding-box;
}

#div3 {
  border: 5px dotted black;
  padding: 35px;
  background-color: lightblue;
  background-clip: content-box;
}

CSS Background Properties

Property Description
background A shorthand property for setting all the background properties in one declaration
background-clip Specifies the painting area of the background
background-image Specifies one or more background images for an element
background-origin Specifies where the background image(s) is/are positioned
background-size Specifies the size of the background image(s)

[S1]

⚖️ 비교 및 선택 기준 (Comparison & decision criteria)

Choosing the clip extent (paint boundary): [S1]

  • border-box (default) — background paints all the way behind the border; useful so a dotted/transparent border shows the background through its gaps.
  • padding-box — background stops at the inner edge of the border, leaving the border area unpainted.
  • content-box — background paints only within the content box, leaving both border and padding areas unpainted. Note background-clip controls the painted area, whereas CSS Background Origin controls the image's starting position. [S1]

🛠️ 적용 사례 (Applied in summary)

The page's two example sets (the same dotted-border, padded box with border-box/padding-box/content-box applied to a background image and then to a background color) are the applied cases. No external project/commit applications found in the source.

💻 코드 패턴 (Code patterns)

Clip the background color to the content box (language: CSS):

selector {
  border: 5px dotted black;
  padding: 35px;
  background-color: lightblue;
  background-clip: content-box;
}

⚖️ 모순 및 업데이트 (Contradictions & updates)

No contradictions found in the source.

검증 상태 및 신뢰도

  • 상태: draft
  • 검증 단계: conceptual (실제 적용 사례 발견 시 applied/validated로 승격 가능)
  • 출처 신뢰도: B (W3Schools — widely used educational reference, not a primary standards body)
  • 신뢰 점수: 0.88
  • 중복 검사 결과: 신규 생성 (New discovery)

🔗 지식 그래프 (Knowledge Graph)

📚 출처 (Sources)

📝 변경 이력 (Change history)

  • 2026-06-23: Initial draft synthesized from the W3Schools "CSS Background Clip" page (Astra wiki-curation, P-Reinforce v3.1 format).