W3Schools 튜토리얼을 P-Reinforce v3.1 포맷으로 위키화(영어 본문, 한/영 섹션 헤더). - Topic_HTML: 59문서 (튜토리얼+예제, 레퍼런스/메타 제외) - Topic_CSS: 190문서 (메인 + Advanced/Flexbox/Grid/RWD 전체) - Topic_JavaScript: 120문서 (코어 언어; Temporal/DOM상세/BOM/WebAPI/AJAX/jQuery/Graphics 등은 후속) 각 폴더 00_INDEX.md(MOC) 포함. 코드 verbatim, 미확인분은 "Not found in source" 표기. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
4.9 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-opacity | CSS Opacity | Frontend | draft | conceptual |
|
B | 0.88 | 2026-06-23 | 2026-06-23 |
|
|
CSS Opacity
🎯 한 줄 통찰 (One-line insight)
The opacity property sets how transparent an element is on a 0.0–1.0 scale, but because it affects the whole element (including children), rgba() is preferred when only the background should be see-through. [S1]
🧠 핵심 개념 (Core concepts)
opacityproperty — specifies the opacity/transparency of an element. [S1]- Value range — 0.0 is completely transparent, 1.0 is fully opaque. [S1]
- Hover interaction — opacity can change on
:hoverto fade images in or out. [S1] - RGBA alternative —
rgba()adds a fourth alpha value (0.0–1.0) to a color, making only that color transparent. [S1]
🧩 추출된 패턴 (Extracted patterns)
- Fade-on-hover — pair a base
opacitywith an:hoveropacity to brighten or dim images on pointer-over. [S1] - Transparent background only — use
rgba()onbackground-colorso the text/children stay fully opaque while the background is see-through. [S1] - Text-in-transparent-box — layer a
transboxwith anrgba()background over a patterned backgrounddiv. [S1]
📖 세부 내용 (Details)
Opacity property [S1]
The opacity property specifies the opacity/transparency of an element. It can take a value from 0.0 to 1.0, where 0.0 is completely transparent and 1.0 is fully opaque.
Basic image opacity:
img {
opacity: 0.5;
}
Transparent image that becomes opaque on hover:
img {
opacity: 0.5;
}
img:hover {
opacity: 1.0;
}
Reversed hover effect (opaque image fades on hover):
img:hover {
opacity: 0.5;
}
Transparent box:
div {
opacity: 0.3;
}
Transparency using RGBA [S1] RGBA color values add a fourth alpha channel that specifies the opacity of the color, so only the background becomes transparent:
div {
background: rgba(4, 170, 109, 0.3) /* Green background with 30% opacity */
}
Text in a transparent box [S1]
<html>
<head>
<style>
div.background {
background: url(klematis.jpg) repeat;
border: 2px solid black;
}
div.transbox {
margin: 30px;
background-color: rgba(255, 255, 255, 0.6);
border: 1px solid black;
}
div.transbox p {
margin: 5%;
font-weight: bold;
color: #000000;
}
</style>
</head>
<body>
<div class="background">
<div class="transbox">
<p>This is some text that is placed in the transparent box.</p>
</div>
</div>
</body>
</html>
🛠️ 적용 사례 (Applied in summary)
The page's applied examples are the half-opacity image, hover fade-in/fade-out images, the 30%-opacity div, the RGBA green background, and the text-in-transparent-box layout. No external project/commit applications found in the source.
💻 코드 패턴 (Code patterns)
Fade image in on hover (language: CSS):
img {
opacity: 0.5;
}
img:hover {
opacity: 1.0;
}
Transparent background only, via RGBA (language: CSS):
div {
background: rgba(255, 255, 255, 0.6);
}
⚖️ 비교 및 선택 기준 (Comparison & decision criteria)
opacityvsrgba()— The source distinguishes the two:opacityapplies to the whole element and is shown fading entire images/boxes, whereas the "Transparency using RGBA" approach applies the alpha only to a color so a background can be transparent without dimming its content. Useopacityto fade an element as a whole; usergba()when only the background color should be transparent (as in the text-in-transparent-box example). [S1]
⚖️ 모순 및 업데이트 (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)
- 상위/루트: CSS Tutorial
- 관련 개념: CSS Colors, CSS Backgrounds, CSS Images
- 참조 맥락: Referenced when fading elements or making backgrounds see-through.
📚 출처 (Sources)
- [S1] W3Schools — CSS Opacity — https://www.w3schools.com/css/css_image_transparency.asp
📝 변경 이력 (Change history)
- 2026-06-23: Initial draft synthesized from the W3Schools "CSS Opacity" page (Astra wiki-curation, P-Reinforce v3.1 format).