--- id: howto-css-full-page title: "How To - Full Page Image" category: "Web_Recipes" status: "draft" verification_status: "conceptual" canonical_id: "" aliases: ["fullscreen background image CSS", "background-size cover"] duplicate_of: "" source_trust_level: "B" confidence_score: 0.83 created_at: 2026-07-04 updated_at: 2026-07-04 review_reason: "" merge_history: [] tags: ["howto", "css", "w3schools", "layout", "background-image"] raw_sources: ["https://www.w3schools.com/howto/howto_css_full_page.asp"] applied_in: [] github_commit: "" --- # [[HOWTO CSS Full Page]] ## 🎯 ν•œ 쀄 톡찰 (One-line insight) This recipe needs the SAME `html, body { height: 100% }` foundation already established in `[[HOWTO CSS Div Full Height]]` β€” a full-page background image is really just "full-height div" plus three background properties (`background-position: center; background-repeat: no-repeat; background-size: cover;`) that together crop and scale the image to fill the box without distortion or tiling, and switching to a "half page" image is a ONE-LINE change (`height: 50%` instead of `100%`) since the height percentage is what defines "how much of the page" the image covers, not the background properties themselves. [S1] ## 🧠 핡심 κ°œλ… (Core concepts) - **`html, body { height: 100%; }` prerequisite** β€” same requirement as the full-height div recipe: percentage heights need a defined ancestor chain. [S1] - **`background-size: cover`** β€” scales the image to completely cover the element's box, cropping overflow, never leaving gaps or distorting aspect ratio. [S1] - **`background-position: center`** β€” centers the visible crop of the image within the box. [S1] - **`background-repeat: no-repeat`** β€” prevents the image from tiling. [S1] - **Height percentage controls page coverage** β€” `height: 100%` = full page, `height: 50%` = half page; the background properties stay identical either way. [S1] ## πŸ“– μ„ΈλΆ€ λ‚΄μš© (Details) - Full-page: `body, html { height: 100%; } .bg { background-image: url("img_girl.jpg"); height: 100%; background-position: center; background-repeat: no-repeat; background-size: cover; }`. [S1] - Half-page: same `.bg` rules, just `height: 50%;`. [S1] ## βš–οΈ λͺ¨μˆœ 및 μ—…λ°μ΄νŠΈ (Contradictions & updates) μ—†μŒ β€” μ‹ κ·œ λ ˆμ‹œν”Ό, κΈ°μ‘΄ λ¬Έμ„œμ™€ λͺ¨μˆœλ˜λŠ” λ‚΄μš© μ—†μŒ. ## πŸ› οΈ 적용 사둀 (Applied in summary) 전체 ν™”λ©΄κ³Ό 절반 ν™”λ©΄ 두 κ°€μ§€ λ°°κ²½ 이미지 데λͺ¨κ°€ μ›λ¬Έμ—μ„œ λ‚˜λž€νžˆ μ œμ‹œλ¨. [S1] ## πŸ’» μ½”λ“œ νŒ¨ν„΄ (Code patterns) Full-screen background image, cropped and centered without distortion (CSS): ```css body, html { height: 100%; } .bg { background-image: url("img_girl.jpg"); height: 100%; background-position: center; background-repeat: no-repeat; background-size: cover; } ``` ## βœ… 검증 μƒνƒœ 및 신뒰도 - **μƒνƒœ:** draft - **검증 단계:** conceptual - **좜처 신뒰도:** B (W3Schools β€” widely used educational reference) - **μ‹ λ’° 점수:** 0.83 - **쀑볡 검사 κ²°κ³Ό:** μ‹ κ·œ 생성 (New discovery) ## πŸ”— 지식 κ·Έλž˜ν”„ (Knowledge Graph) - **μƒμœ„/루트:** [[W3Schools HOW TO]] - **κ΄€λ ¨ κ°œλ…:** [[HOWTO CSS Div Full Height]], [[HOWTO CSS Hero Image]], [[HOWTO CSS Fullscreen Video]] - **μ°Έμ‘° λ§₯락:** CSS Layout & Positioning μ„Ήμ…˜. ## πŸ“š 좜처 (Sources) - [S1] W3Schools β€” How To - Full Page Image β€” https://www.w3schools.com/howto/howto_css_full_page.asp ## πŸ“ λ³€κ²½ 이λ ₯ (Change history) - 2026-07-04: Initial draft synthesized from the W3Schools "How To - Full Page Image" recipe (Astra wiki-curation, P-Reinforce v3.1 format).