Files
2nd/10_Wiki/Dev/Topic_CSS/CSS_Masking_PNG.md
T
Antigravity Agent 1cfd3bbb56 docs(10_Wiki): 위키 구조 정리 — 언어 튜토리얼 카테고리 폴더 제거 + 신규 자산 동기화
Topic_CSS/Topic_HTML/Topic_JavaScript/Topic_Prompt/Topic_Comfyui 등 기존 카테고리 폴더를 정리하고,
Topic_Graphic/Dev 등 신규 산출물과 Topics 내부 세션/메모리 기록을 동기화.
2026-07-05 00:10:59 +09:00

5.1 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-masking-with-png CSS Masking with PNG Frontend draft conceptual
mask-image
PNG mask
CSS masking
mask-repeat
mask-position
B 0.87 2026-06-23 2026-06-23
css
web
frontend
w3schools
masking
mask-image
images
https://www.w3schools.com/css/css3_masking.asp

CSS Masking with PNG

🎯 한 줄 통찰 (One-line insight)

CSS masking creates a mask layer placed over an element to partially or fully hide portions of it; a PNG image can serve as that mask layer via the mask-image property. [S1]

🧠 핵심 개념 (Core concepts)

  • CSS masking — lets you create a mask layer to place over an element to partially or fully hide portions of the element. [S1]
  • mask-image — specifies a mask layer image; it can use a PNG image, an SVG image, a CSS gradient, or an SVG <mask> element. [S1]
  • Transparency rule — the mask image needs a transparent or semi-transparent area; black indicates fully transparent. [S1]
  • -webkit- prefix — examples pair mask-image with -webkit-mask-image for browser support. [S1]

🧩 추출된 패턴 (Extracted patterns)

  • PNG as mask — set both -webkit-mask-image and mask-image to url(...) pointing at a PNG with transparent regions. [S1]
  • Control tiling — add mask-repeat: no-repeat; to stop the mask image from tiling across the element. [S1]
  • Control placement — add mask-position (e.g. center) to set where the mask image starts. [S1]

📖 세부 내용 (Details)

What CSS masking is — CSS masking allows you to create a mask layer to place over an element to partially or fully hide portions of the element. The mask-image property specifies a mask layer image, which can be a PNG image, an SVG image, a CSS gradient, or an SVG <mask> element. [S1]

Using a PNG image as the mask layer — The mask image needs to have a transparent or semi-transparent area. Black indicates fully transparent. [S1]

.mask1 {
  -webkit-mask-image: url(w3logo.png);
  mask-image: url(w3logo.png);
  mask-repeat: no-repeat;
}

Repeating mask layer images — when mask-repeat is omitted, the mask image will be repeated all over the image. [S1]

.mask1 {
  -webkit-mask-image: url(w3logo.png);
  mask-image: url(w3logo.png);
}

Positioning mask images — the mask-position property sets the starting position of a mask image. [S1]

.mask1 {
  -webkit-mask-image: url(w3logo.png);
  mask-image: url(w3logo.png);
  mask-repeat: no-repeat;
  mask-position: center;
}

CSS masking properties reference [S1]

Property Description
mask-clip Specifies which area is affected by a mask image
mask-composite Specifies a compositing operation used on the current mask layer with the mask layers below it
mask-image Specifies an image to be used as a mask layer for an element
mask-mode Specifies whether the mask layer image is treated as a luminance mask or as an alpha mask
mask-origin Specifies the origin position (the mask position area) of a mask layer image
mask-position Sets the starting position of a mask layer image (relative to the mask position area)
mask-repeat Specifies how the mask layer image is repeated
mask-size Specifies the size of a mask layer image
mask-type Specifies whether an SVG <mask> element is treated as a luminance mask or as an alpha mask

🛠️ 적용 사례 (Applied in summary)

The page's own examples are the applied cases: applying the w3logo.png PNG as a mask layer over a photograph, with no-repeat, default repeat, and centered positioning. No external project/commit applications found in the source.

💻 코드 패턴 (Code patterns)

Apply a non-repeating PNG mask layer (language: CSS):

.mask1 {
  -webkit-mask-image: url(w3logo.png);
  mask-image: url(w3logo.png);
  mask-repeat: no-repeat;
}

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

No contradictions found in the source.

검증 상태 및 신뢰도

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

🔗 지식 그래프 (Knowledge Graph)

📚 출처 (Sources)

📝 변경 이력 (Change history)

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