카드 레이아웃
Coddy HTML 여정의 CSS Mastery 섹션에 포함된 레슨 — 43개 중 29번째.
챌린지
쉬움이 레슨에서는 배경, 테두리, 패딩을 추가하고 아이콘과 제목 크기를 조정하여 개별 카드의 스타일을 지정합니다. 또한 둥근 모서리와 간격을 추가하여 카드에 세련된 느낌을 줄 것입니다.
CSS 챌린지:
.feature클래스에 스타일을 적용하여 각 카드에 흰색 배경, 패딩 및 둥근 모서리를 설정하세요.- 테두리를 설정하고 각 카드의 너비를 조정하세요.
- .feature 클래스 내부의
.icon에 글꼴 크기를 변경하고 하단 마진을 추가하여 스타일을 지정하세요. .feature내부의h3태그에 텍스트 색상을 변경하고 제목 아래에 간격을 추가하여 스타일을 지정하세요.
직접 해보기
<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>