복습 챌린지
Coddy HTML 여정의 CSS Mastery 섹션에 포함된 레슨 — 43개 중 6번째.
챌린지
쉬움여러분은 자손(descendant), 자식(child), 인접 형제(adjacent sibling), 그리고 일반 형제(general sibling) 결합자를 사용하여 CSS 선택자를 조합하는 방법을 배웠습니다. 이제 모든 것을 실습에 옮길 시간입니다!
.rooms클래스를 가진<div>내부의 직계 자식인 모든<p>요소를 터쿼이즈 블루(#40e0d0)를 사용하여 스타일링하세요..facilities클래스를 가진<div>의 자손인 모든<p>요소를 시폼 그린(#2e8b57)을 사용하여 스타일링하세요.<div>다음에 오는 모든<p>요소를 샌디 베이지(#f4a300)로 스타일링하세요.
직접 해보기
<!DOCTYPE html>
<html>
<head>
<title>Recap Challenge</title>
<style>
/* Your CSS solution here */
</style>
</head>
<body>
<section>
<h1>Welcome to Paradise Resort</h1>
<div class="rooms">
<h2>Ocean View Rooms</h2>
<p>Room 101</p>
<p>Room 102</p>
</div>
<div class="facilities">
<h2>Resort Facilities</h2>
<div>
<p>Infinity Pool</p>
<p>Spa & Wellness Center</p>
</div>
<p>Beach Access</p>
</div>
<p>Beachfront Restaurant</p>
<p>Sunset Bar</p>
</section>
</body>
</html>