예약 패널
Coddy Tailwind CSS 여정의 반응형 UI 패턴 섹션에 포함된 레슨. 55개 중 53번째.
1단계의 셸, 반응형 레일, 줄 바꿈 탐색 메뉴와 2단계의 콘텐츠 컨테이너, 화면 크기에 따라 조정되는 2열 카드 그리드, 하단에 정렬된 예약 링크를 유지하고, 이들의 크기와 간격도 모두 그대로 유지하세요. 예약 양식은 768px 미만에서는 한 열로, 더 넓은 화면에서는 너비가 같은 두 열로 만들고, 두 방향 모두 16px 간격을 두세요. 가이드 필드셋은 양식의 행 전체를 차지하게 하세요. 레이블과 네이티브 제약 조건을 유지하세요. 필수 이메일 입력란은 유효하지 않을 때 실선 2px 윤곽선을 표시하고, 유효할 때는 윤곽선 너비를 0으로 설정하세요. 네이티브 라디오 선택 카드 각각은 선택되지 않았을 때 흰색에 보통 굵기로 표시하고, 하위 요소가 선택되면 #dbeafe 배경에 굵게 표시하세요. 선택을 변경하면 이전 카드의 스타일을 원래대로 되돌리세요.
챌린지
전문가1단계의 셸, 반응형 레일, 줄 바꿈 내비게이션에 더해 2단계의 콘텐츠 컨테이너, 컨테이너 너비에 반응하는 2개 카드 그리드, 아래쪽에 정렬된 예약 링크를 유지하고, 모든 크기와 간격도 그대로 유지하세요. 예약 양식은 768px 미만에서 한 열, 더 넓은 뷰포트에서 동일한 너비의 두 열로 만들고, 두 축 모두에 16px 간격을 적용하세요. 가이드 필드셋은 양식의 전체 행을 차지합니다. 라벨과 기본 제약 조건을 유지하세요. 필수 이메일 입력란은 유효하지 않을 때 단색 2px 윤곽선을, 유효할 때 윤곽선 너비 0을 사용합니다. 각 기본 라디오 선택 카드는 선택되지 않은 상태에서는 흰색에 보통 굵기이고, 하위 요소가 선택되면 #dbeafe 배경에 굵은 글꼴로 바뀝니다. 선택 항목을 옮기면 이전 카드가 원래 상태로 돌아갑니다.
제공된 콘텐츠, 시맨틱 요소 및 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"><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"></div>
<fieldset id="choices" class=""><legend>Guide format</legend><label id="digitalCard" class="block p-3 "><input id="digital" type="radio" name="guide"> Digital guide</label><label id="printedCard" class="block p-3 "><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-hidden"><table id="table" class="w-full border-separate border-spacing-0 "><caption>Studio start times</caption><colgroup><col class="w-40"><col></colgroup><thead><tr><th scope="col" class="">Time</th><th scope="col" class="">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>
이 레슨에는 짧은 퀴즈가 포함되어 있습니다. 레슨을 시작해 문제를 풀고 진행 상황을 기록하세요.