섹션 레이아웃
Coddy HTML 여정의 CSS Mastery 섹션에 포함된 레슨 — 43개 중 28번째.
챌린지
쉬움Flexbox를 사용하여 취미 카드를 깔끔하고 중앙에 정렬되도록 만들 것입니다. 또한 섹션 제목이 명확하고 간격이 잘 맞도록 스타일을 지정할 것입니다.
CSS 챌린지:
.features섹션에 약간의 패딩을 주고 텍스트를 중앙 정렬하도록 스타일을 지정하세요..section-title이 눈에 띄도록 스타일을 지정하세요 — 글꼴 크기와 색상을 변경하고 아래쪽에 여백을 추가하세요..cards컨테이너에 Flexbox를 사용하여 카드들을 한 줄로 나열하세요. 필요한 경우 줄바꿈이 되도록 하고 카드 사이에 간격을 두세요.
직접 해보기
<html>
<head>
<title>Hobby Club Landing Page</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<header class="hero">
<div class="container">
<h1>Welcome to Hobby Club</h1>
<p>Find your passion. Join a community. Grow your skills.</p>
<a href="#" class="btn">Get Started</a>
</div>
</header>
<section class="features">
<h2 class="section-title">Popular Clubs</h2>
<div class="cards">
<div class="feature">
<div class="icon"><img src="https://upload.wikimedia.org/wikipedia/commons/f/fa/Android_Emoji_1f4f7_red.svg" width="20px"></div>
<h3>Photography</h3>
<p>Capture the moment and share your perspective.</p>
</div>
<div class="feature">
<div class="icon"><img src="https://upload.wikimedia.org/wikipedia/commons/5/51/Emoji_u1f3a8.svg" width="20px"></div>
<h3>Art & Design</h3>
<p>Draw, paint, and bring your creative ideas to life.</p>
</div>
<div class="feature">
<div class="icon"><img src="https://upload.wikimedia.org/wikipedia/commons/e/e6/Emoji_u1f3ae.svg" width="20px"></div>
<h3>Gaming</h3>
<p>Connect with fellow gamers and play your favorite titles.</p>
</div>
</div>
</section>
</body>
</html>