--- id: css-image-styling title: "CSS Image Styling" category: "Frontend" status: "draft" verification_status: "conceptual" canonical_id: "" aliases: ["rounded images", "circled image", "CSS thumbnail", "responsive image", "polaroid card", "image styling"] duplicate_of: "" source_trust_level: "B" confidence_score: 0.88 created_at: 2026-06-23 updated_at: 2026-06-23 review_reason: "" merge_history: [] tags: ["css", "web", "frontend", "w3schools", "images", "border-radius"] raw_sources: ["https://www.w3schools.com/css/css3_images.asp"] applied_in: [] github_commit: "" --- # [[CSS Image Styling]] ## 🎯 ν•œ 쀄 톡찰 (One-line insight) CSS styles images with simple properties β€” `border-radius` rounds or circles them, borders and padding make thumbnails, `max-width: 100%` makes them responsive, and `box-shadow` turns them into polaroid-style cards. [S1] ## 🧠 핡심 κ°œλ… (Core concepts) - **Rounded images** β€” `border-radius` rounds the corners of an image. [S1] - **Circled images** β€” `border-radius: 50%` makes an image fully circular. [S1] - **Thumbnails** β€” a border combined with `border-radius`, `padding`, and a fixed `width` produces a framed thumbnail. [S1] - **Responsive images** β€” `max-width: 100%` with `height: auto` scales an image down to fit its container while never exceeding its natural size. [S1] - **Polaroid cards** β€” a white background with a layered `box-shadow` and a captioned container gives a polaroid/card look. [S1] - **Responsive gallery** β€” `@media` queries with `calc()` widths lay out a grid of images that reflows by screen size. [S1] ## 🧩 μΆ”μΆœλœ νŒ¨ν„΄ (Extracted patterns) - **Radius-driven shape** β€” the same `border-radius` property both softens corners (`8px`) and creates a perfect circle (`50%`). [S1] - **Fluid sizing** β€” `max-width: 100%; height: auto;` is the standard recipe for an image that shrinks with its container but keeps its aspect ratio. [S1] - **Card composition** β€” wrap an image in a container and add `box-shadow` plus a padded caption area to build a reusable card component. [S1] ## πŸ“– μ„ΈλΆ€ λ‚΄μš© (Details) **Rounded image** Use the `border-radius` property to create rounded corners on an image. [S1] ```css img { border-radius: 8px; } ``` **Circled image** A `border-radius` of `50%` turns the image into a circle. [S1] ```css img { border-radius: 50%; } ``` **Thumbnail images** Combine a border, rounded corners, padding, and a width to make a thumbnail. [S1] ```css img { border: 1px solid #ddd; border-radius: 4px; padding: 5px; width: 150px; } ``` **Thumbnail as a link with hover** The tutorial also shows wrapping a thumbnail in a link and adding a `box-shadow` on hover for an interactive effect. The exact hover declaration block is not reproduced inline in the fetched content beyond the described `box-shadow` on hover. [S1] **Responsive images** A responsive image scales nicely to fit any container, using `max-width: 100%` and `height: auto`. [S1] ```css img { max-width: 100%; height: auto; } ``` **Polaroid images / cards** Add a white background and a layered `box-shadow`, with the image filling the card width and a centered, padded caption container. [S1] ```css div.polaroid { width: 80%; background-color: white; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); } img { width: 100%; } div.container { text-align: center; padding: 10px 20px; } ``` **Responsive image gallery** A gallery of images can be made responsive with `@media` queries and `calc()`-based widths so the number of columns adapts to the viewport. The full gallery markup was not reproduced inline in the fetched content. [S1] ## πŸ› οΈ 적용 사둀 (Applied in summary) The rounded, circled, thumbnail, responsive, and polaroid examples above are the source's applied cases for common image presentations. No external project/commit applications found in the source. ## πŸ’» μ½”λ“œ νŒ¨ν„΄ (Code patterns) Responsive image (language: CSS): ```css img { max-width: 100%; height: auto; } ``` Circular avatar: ```css img { border-radius: 50%; } ``` ## βš–οΈ λͺ¨μˆœ 및 μ—…λ°μ΄νŠΈ (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 Image Centering]], [[CSS Image Filters]], [[CSS Border]], [[CSS Box Shadow]] - **μ°Έμ‘° λ§₯락:** Referenced whenever presenting images as avatars, thumbnails, responsive media, or cards. ## πŸ“š 좜처 (Sources) - [S1] W3Schools β€” CSS Image Styling β€” https://www.w3schools.com/css/css3_images.asp ## πŸ“ λ³€κ²½ 이λ ₯ (Change history) - 2026-06-23: Initial draft synthesized from the W3Schools "CSS Image Styling" page (Astra wiki-curation, P-Reinforce v3.1 format).