Skip to Content
CSS

CSS

MDN

Containment

container query

<div class="post"> <div class="card"> <h2>Card title</h2> <p>Card content</p> </div> </div>
.post { container-type: inline-size; } /* Default heading styles for the card title */ .card h2 { font-size: 1em; } /* If the container is larger than 700px */ @container (width > 700px) { .card h2 { font-size: 2em; } }

Using container queries, the card can be reused in multiple areas of a page without needing to know specifically where it will be placed each time.

  • Naming containment contexts
.post { container-type: inline-size; container-name: sidebar; } @container sidebar (width > 700px) { .card { font-size: 2em; } }

inline-block text hover effect

Hover me!Hover me!

Emotion Examples

Emotion 고급 기능들

Props를 사용한 동적 스타일링

CSS 함수를 사용한 동적 스타일링

중첩된 스타일링

Emotion은 중첩된 CSS를 완벽하게 지원합니다.

  • Pseudo-selectors
  • Media queries
  • Keyframe animations

반응형 디자인

CSS Grid와 Media Queries를 조합하여 반응형 레이아웃을 만들 수 있습니다.

  • Mobile-first approach
  • Flexible grid system
  • Breakpoint management

애니메이션

CSS 애니메이션과 키프레임을 직관적으로 사용할 수 있습니다.

  • Keyframe animations
  • Transition effects
  • Performance optimized
BOUNCE
Last updated on