--- id: css-image-hover title: "CSS Image Hover Overlays" category: "Frontend" status: "draft" verification_status: "conceptual" canonical_id: "" aliases: ["image overlay", "hover overlay", "fade overlay", "slide overlay", "image hover effect"] duplicate_of: "" source_trust_level: "B" confidence_score: 0.85 created_at: 2026-06-23 updated_at: 2026-06-23 review_reason: "" merge_history: [] tags: ["css", "web", "frontend", "w3schools", "images", "hover"] raw_sources: ["https://www.w3schools.com/css/css3_images_hover.asp"] applied_in: [] github_commit: "" --- # [[CSS Image Hover Overlays]] ## 🎯 ν•œ 쀄 톡찰 (One-line insight) A hover overlay reveals hidden content over an image when the user hovers, either fading in (text or a box) or sliding in from the top, bottom, left, or right. [S1] ## 🧠 핡심 κ°œλ… (Core concepts) - **Overlay on hover** β€” the goal is to create an overlay effect on hover that reveals text or a colored box over the image. [S1] - **Fade effects** β€” the overlay can fade in text, or fade in a box, when the image is hovered. [S1] - **Slide effects** β€” the overlay can also slide in from the top, bottom, left, or right. [S1] - **Reveal mechanism** β€” the overlay element starts hidden (typically `opacity: 0` or zero size) and a hover rule reveals it, with a `transition` for smoothness. [S1] ## 🧩 μΆ”μΆœλœ νŒ¨ν„΄ (Extracted patterns) - **Hidden-then-revealed overlay** β€” place an overlay element over the image, keep it hidden, and flip it on the container's `:hover`. [S1] - **Direction by initial offset** β€” slide effects differ by which dimension/offset starts collapsed (top/bottom/left/right) and grows on hover. [S1] ## πŸ“– μ„ΈλΆ€ λ‚΄μš© (Details) **Overlay image hover effects** The page demonstrates how to create an overlay effect on hover, revealing hidden content or a visual enhancement over an image. The examples, in order, are: [S1] 1. Fade in text 2. Fade in a box 3. Slide in (top) 4. Slide in (bottom) 5. Slide in (left) 6. Slide in (right) **Implementation pattern (described)** The overlay pattern uses an overlay element with an initial `opacity` of `0` (invisible), a `transition` property for a smooth reveal, a `background-color` for the overlay layer, and a hover state that changes `opacity` to `1` (or adjusts dimensions for slide effects). [S1] **Code availability** The detailed CSS for the `.container`, `.image`, `.overlay`, and `.text` classes β€” including the exact transition durations, opacity values, and positioning β€” is presented on the page only as "Try it Yourself" interactive examples and is **Not found in source** as inline code in the fetched content. The exact declaration blocks should not be invented; consult the W3Schools editor for verbatim code. [S1] ## πŸ› οΈ 적용 사둀 (Applied in summary) The source's applied cases are the six hover-overlay demos (fade-in text, fade-in box, and four slide-in directions). The exact CSS for each is not reproduced here (Not found in source). No external project/commit applications found in the source. ## πŸ’» μ½”λ“œ νŒ¨ν„΄ (Code patterns) Conceptual overlay-reveal skeleton, grounded in the page's described pattern (exact W3Schools values Not found in source): ```css .overlay { opacity: 0; transition: opacity 0.5s; background-color: /* overlay color */; } .container:hover .overlay { opacity: 1; } ``` ## βš–οΈ 비ꡐ 및 선택 κΈ°μ€€ (Comparison & decision criteria) Per the source, choose **fade** effects (text or box) when you want the overlay to appear in place, and **slide** effects when you want it to enter from an edge; the four slide directions (top, bottom, left, right) differ only by which edge the overlay starts collapsed against and grows from on hover. [S1] ## βš–οΈ λͺ¨μˆœ 및 μ—…λ°μ΄νŠΈ (Contradictions & updates) No contradictions found in the source. Note: full per-example CSS was not available inline (marked "Not found in source"). ## βœ… 검증 μƒνƒœ 및 신뒰도 - **μƒνƒœ:** draft - **검증 단계:** conceptual (μ‹€μ œ 적용 사둀 발견 μ‹œ applied/validated둜 승격 κ°€λŠ₯) - **좜처 신뒰도:** B (W3Schools β€” widely used educational reference, not a primary standards body) - **μ‹ λ’° 점수:** 0.85 - **쀑볡 검사 κ²°κ³Ό:** μ‹ κ·œ 생성 (New discovery) ## πŸ”— 지식 κ·Έλž˜ν”„ (Knowledge Graph) - **μƒμœ„/루트:** [[CSS Tutorial]] - **κ΄€λ ¨ κ°œλ…:** [[CSS Image Effects]], [[CSS Image Modal]], [[CSS Transitions]], [[CSS Opacity]] - **μ°Έμ‘° λ§₯락:** Referenced when adding interactive captions or reveal effects to images in galleries and cards. ## πŸ“š 좜처 (Sources) - [S1] W3Schools β€” CSS Image Hover Overlays β€” https://www.w3schools.com/css/css3_images_hover.asp ## πŸ“ λ³€κ²½ 이λ ₯ (Change history) - 2026-06-23: Initial draft synthesized from the W3Schools "CSS Image Hover Overlays" page (Astra wiki-curation, P-Reinforce v3.1 format).