반응형 이벤트 포털
Coddy Tailwind CSS 여정의 반응형 UI 패턴 섹션에 포함된 레슨. 55개 중 55번째.
이전의 모든 기능을 유지하면서 포털을 완성하세요. 가운데 정렬된 960px 캡 셸, 뷰포트 최소 높이, 64px 헤더와 48px 푸터를 유지하세요. 좁은 화면에서는 세로로 쌓고, 넓은 화면에서는 160px 레일과 24px 간격의 메인 영역을 사용하세요. 12px 간격으로 줄 바꿈되는 내비게이션을 적용하세요. inline-size 콘텐츠를 포함하고, 로컬 기준점 480px에서 16px 간격으로 1열 또는 2열 카드가 표시되도록 하며, 예약 링크를 아래쪽에 정렬하세요. 16px 간격과 전체 행을 차지하는 가이드 선택 항목을 갖춘 반응형 1열 또는 2열 양식을 만드세요. 필수 이메일 입력란이 유효하지 않을 때는 2px 윤곽선을, 유효할 때는 윤곽선을 표시하지 않도록 하세요. 라디오 카드는 흰색과 보통 굵기로 표시하고, 선택된 경우에만 #dbeafe 배경색과 굵은 글꼴로 바꾸세요. 2축으로 스크롤되는 160px 일정 뷰포트, 최소 너비가 640px인 고정 테이블, 160px 첫 번째 열, 위쪽 0에 고정되는 흰색 10단계 헤더를 설정하고 모든 테이블 의미를 유지하세요. 이제 접근 가능한 역방향 패턴을 사용해 첫 번째 건너뛰기 링크가 포커스를 받으면 표시되도록 하되, 기본 목적지와 전체 표시 상태를 유지하세요. Reserve의 최소 너비와 높이를 44px로 설정하고, 콘텐츠를 플렉스로 가운데 정렬하며, 키보드 포커스가 보일 때 2px 실선 윤곽선과 4px 오프셋을 적용하세요. 처음에는 네이티브 비활성 상태를 유지하세요. 비활성 상태에서는 불투명도를 50%로 하고 not-allowed 커서를 사용하며, 활성 상태에서는 불투명도를 100%로 하고 포인터 커서를 사용하세요. 장식용 예약 프레임은 aria-hidden 상태를 유지하면서 포인터 이벤트를 무시하게 하여, 활성화된 네이티브 버튼이 제공된 카운터를 업데이트하도록 하세요. 콘텐츠 전체와 제공된 동작을 유지하세요.
챌린지
전문가이전의 모든 기능을 유지하면서 포털을 완성하세요. 가운데 정렬된 최대 너비 960px의 그리드 셸, 뷰포트 최소 높이, 64px 헤더와 48px 푸터를 유지하세요. 좁은 화면에서는 세로로 쌓고 넓은 화면에서는 160px 레일과 24px의 메인 간격을 사용하세요. 간격이 12px인 줄 바꿈 내비게이션, inline-size 콘텐츠 격리, 480px 컨테이너 임계점에서 16px 간격으로 한 열 또는 두 열로 표시되는 카드와 아래쪽에 정렬된 예약 링크를 유지하세요. 16px 간격의 반응형 한 열 또는 두 열 폼과 전체 행을 차지하는 가이드 선택 항목도 유지하세요. 필수 이메일 입력란에는 유효하지 않을 때 2px 윤곽선을, 유효할 때는 0 윤곽선을 표시하세요. 흰색 배경의 일반 굵기 라디오 카드는 선택된 경우에만 #dbeafe 배경과 굵은 글꼴로 바뀌게 하세요. 2축 스크롤을 지원하는 160px 높이의 일정 표시 영역, 최소 너비 640px의 고정 레이아웃 표, 160px 너비의 첫 번째 열, 맨 위에 고정되는 흰색 10단계 헤더를 유지하고 표의 모든 의미 구조를 보존하세요. 이제 접근성을 위한 반전 패턴을 사용해 포커스 시 첫 번째 건너뛰기 링크를 표시하되, 메인 영역으로 연결되는 대상과 완전히 보이는 상태를 유지하세요. Reserve의 최소 너비와 높이를 44px로 설정하고, 콘텐츠를 플렉스로 가운데 정렬하며, 키보드 포커스 시 4px 오프셋이 있는 실선 2px 윤곽선이 보이게 하세요. 처음에는 기본 비활성화 상태를 유지하세요. 비활성화되면 불투명도를 50%로 하고 not-allowed 커서를 사용하며, 활성화되면 불투명도를 100%로 하고 포인터 커서를 사용하세요. 장식용 예약 프레임은 aria-hidden 상태를 유지하면서 포인터 이벤트를 무시하게 하여, 활성화된 기본 버튼으로 제공된 카운터를 갱신할 수 있게 하세요. 콘텐츠 전체와 제공된 동작을 보존하세요.
제공된 콘텐츠, 의미 구조 요소와 ID를 보존하세요. 요청된 유틸리티 클래스를 편집하세요. 편집한 뒤 ‘실행’으로 미리 보기를 실행하고, 결과를 채점하려면 ‘확인’ 또는 코드 실행을 누르세요. 제공된 JavaScript는 읽기 전용입니다.
직접 해보기
<!doctype html>
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Interface workshop</title><link rel="stylesheet" href="./styles.css"></head><body>
<a id="skip" href="#main" class="sr-only">Skip to event content</a>
<div id="shell" class="w-full max-w-[960px] mx-auto grid min-h-screen grid-rows-[auto_1fr_auto]">
<header id="header" class="h-16 flex items-center px-4 bg-slate-900 text-white"><h1 class="text-xl font-bold">Open Studio Weekend</h1></header>
<main id="main" tabindex="-1" class="grid grid-cols-1 md:grid-cols-[160px_minmax(0,1fr)] gap-6">
<nav id="nav" aria-label="Event sections" class="p-4"><ul id="navList" class="flex flex-wrap gap-3"><li><a href="#sessions">Sessions</a></li><li><a href="#booking">Booking</a></li><li><a href="#schedule">Schedule</a></li></ul></nav>
<div id="content" class="min-w-0 space-y-6 @container">
<section id="sessions" aria-labelledby="sessionsTitle"><h2 id="sessionsTitle" class="text-xl font-bold mb-3">Choose a studio</h2><div id="cards" class="grid grid-cols-1 @min-[480px]:grid-cols-2 gap-4">
<article id="cardA" class="h-56 p-4 rounded-xl bg-slate-100 flex flex-col"><h3 class="h-6 font-bold">Printmaking</h3><p class="h-12">Make a small edition with local artists.</p><a id="cardAAction" href="#booking" class="h-10 mt-auto">Choose printmaking</a></article>
<article id="cardB" class="h-56 p-4 rounded-xl bg-slate-100 flex flex-col"><h3 class="h-6 font-bold">Clay studio</h3><p class="h-12">Explore hand-built forms and texture.</p><a id="cardBAction" href="#booking" class="h-10 mt-auto">Choose clay</a></article>
</div></section>
<section id="booking" aria-labelledby="bookingTitle"><h2 id="bookingTitle" class="text-xl font-bold mb-3">Plan your visit</h2>
<form id="form" class="grid grid-cols-1 md:grid-cols-2 gap-4"><div><label for="name" class="block">Name</label><input id="name" class="w-full h-10 border p-2"></div><div><label for="email" class="block">Email</label><input id="email" type="email" required class="w-full h-10 border p-2 outline-solid outline-0 invalid:outline-2"></div>
<fieldset id="choices" class="col-span-full"><legend>Guide format</legend><label id="digitalCard" class="block p-3 bg-white font-normal has-checked:bg-[#dbeafe] has-checked:font-bold"><input id="digital" type="radio" name="guide"> Digital guide</label><label id="printedCard" class="block p-3 bg-white font-normal has-checked:bg-[#dbeafe] has-checked:font-bold"><input id="printed" type="radio" name="guide"> Printed guide</label></fieldset></form>
</section>
<section id="schedule" aria-labelledby="scheduleTitle"><h2 id="scheduleTitle" class="text-xl font-bold mb-3">Weekend schedule</h2><div id="tableWrap" class="w-full h-40 overflow-auto"><table id="table" class="w-full border-separate border-spacing-0 min-w-[640px] table-fixed"><caption>Studio start times</caption><colgroup><col class="w-40"><col></colgroup><thead><tr><th scope="col" class="sticky top-0 z-10 bg-white">Time</th><th scope="col" class="sticky top-0 z-10 bg-white">Session</th></tr></thead><tbody><tr><th scope="row">09:00</th><td>Welcome</td></tr><tr><th scope="row">09:30</th><td>Printmaking</td></tr><tr><th scope="row">10:00</th><td>Clay studio</td></tr><tr><th scope="row">10:30</th><td>Drawing</td></tr><tr><th scope="row">11:00</th><td>Color workshop</td></tr><tr><th scope="row">11:30</th><td>Studio tour</td></tr><tr><th scope="row">12:00</th><td>Lunch</td></tr><tr><th scope="row">13:00</th><td>Open practice</td></tr></tbody></table></div></section>
<section aria-label="Reservation"><button id="availability" class="my-3 p-2 border">Toggle reservation availability</button><div id="reserveArea" class="relative w-64 h-20"><button id="reserve" disabled class="absolute inset-0 outline-solid bg-blue-100 outline-0">Reserve a place</button><div id="reserveFrame" aria-hidden="true" class="absolute inset-0 border-2 border-blue-700 "></div></div><p>Reservations made: <output id="count">0</output></p></section>
</div></main><footer id="footer" class="h-12 flex items-center px-4 bg-slate-100">Access information is available at the welcome desk.</footer></div>
<script src="./controls.js"></script>
</body></html>
이 레슨에는 짧은 퀴즈가 포함되어 있습니다. 레슨을 시작해 문제를 풀고 진행 상황을 기록하세요.