Menu
Coddy logo textTech

복습 챌린지

Coddy HTML 여정의 CSS Mastery 섹션에 포함된 레슨 — 43개 중 25번째.

challenge icon

챌린지

쉬움

이 챌린지에서는 심플하면서도 현대적인 느낌의 커피숍 웹페이지를 만들게 됩니다. 지금까지 배운 그라데이션, CSS 필터, 변형(transforms), 그리고 전환(transitions)을 포함한 모든 내용을 연습할 수 있는 기회입니다.

여러분이 완료해야 할 작업은 다음과 같습니다:

  1. 히어로 섹션의 배경에 선형 그라데이션(linear gradient)을 적용하세요. 원하는 색상을 자유롭게 사용할 수 있습니다.
  2. 마우스를 올렸을 때(hover), CTA 버튼이 transform: rotate(-3deg)로 약간 회전하도록 만들고 부드러운 전환(transition) 효과를 추가하세요.
  3. 커피 이미지의 기본 상태에 필터(filter) sepia(60%)를 적용하세요.
  4. 마우스를 올렸을 때(hover), 커피 이미지 필터를 sepia(0%)로 변경하고 transform: scale(1.1)을 사용하여 이미지를 확대하세요.

직접 해보기

<html>
<head>
    <style>
        * {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
         text-align: center;
        }

        /* Hero Section with Gradient */
        .hero {
            padding: 80px 20px;
            color: #3e2723;
        }

        .hero h1 {
            font-size: 3rem;
            margin-bottom: 10px;
        }

        .hero p {
            font-size: 1.2rem;
            margin-bottom: 20px;
        }

        .cta-btn {
            background-color: #8d6e63;
            color: white;
            padding: 12px 24px;
            border-radius: 8px;
            font-size: 1rem;
        }
        /* Gallery section */
        .gallery {
            padding: 50px 20px;
            background: #fffaf0;
        }

        .gallery h2 {
            margin-bottom: 20px;
            font-size: 2rem;
            color: #4e342e;
        }

        .coffee-img {
            max-width: 300px;
            border-radius: 12px;
        }
        /*Add your CSS here */

    </style>
</head>
<body>
  <header class="hero">
    <h1>Welcome to Coffee Bliss</h1>
    <p>Your daily dose of joy in a cup</p>
    <button class="cta-btn">Order Now</button>
  </header>

  <section class="gallery">
    <h2>Our Signature Blend</h2>
    <img src="https://images.unsplash.com/photo-1509042239860-f550ce710b93?auto=format&fit=crop&w=600&q=80" alt="Cup of Coffee" class="coffee-img" />
  </section>
</body>
</html>

CSS Mastery의 모든 레슨