Menu
CoddyTech

Ôn tập: Bảng dữ liệu

Thuộc phần Mẫu giao diện thích ứng trong hành trình Tailwind CSS của Coddy. Bài học 25 trên 55.

challenge icon

Thử thách

Khó

Tạo khung nhìn lịch có chiều rộng tối đa 440px và chiều cao 192px, có thể cuộn theo cả hai trục. Giữ bảng gốc rộng 600px với bố cục cố định và cột đầu tiên rộng 200px. Cố định cả hai tiêu đề cột ở trên cùng, có nền trắng và mức xếp chồng là 10. Giữ nguyên chú thích và tất cả phạm vi tiêu đề.

Giữ nguyên nội dung, các phần tử ngữ nghĩa và ID đã cho. Chỉnh sửa các lớp tiện ích được yêu cầu. Sau khi chỉnh sửa, nhấn Chạy để xem trước, rồi nhấn Kiểm tra/Chạy code để chấm kết quả. JavaScript được cung cấp ở chế độ chỉ đọc.

Tự làm thử

<!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>
<div id="wrap" class="w-full max-w-[440px] h-48 overflow-hidden"><table id="table" class="w-[600px] border-separate border-spacing-0 table-auto"><caption>Studio schedule</caption><colgroup><col class="w-[200px]"><col></colgroup><thead><tr><th scope="col" class="bg-white">Session</th><th scope="col" class="bg-white">Room</th></tr></thead><tbody><tr id="r1" class=""><th scope="row">Session 1</th><td id="cell1">Room 1</td></tr><tr id="r2" class=""><th scope="row">Session 2</th><td id="cell2">Room 2</td></tr><tr id="r3" class=""><th scope="row">Session 3</th><td id="cell3">Room 3</td></tr><tr id="r4" class=""><th scope="row">Session 4</th><td id="cell4">Room 4</td></tr><tr id="r5" class=""><th scope="row">Session 5</th><td id="cell5">Room 5</td></tr><tr id="r6" class=""><th scope="row">Session 6</th><td id="cell6">Room 6</td></tr><tr id="r7" class=""><th scope="row">Session 7</th><td id="cell7">Room 7</td></tr><tr id="r8" class=""><th scope="row">Session 8</th><td id="cell8">Room 8</td></tr><tr id="r9" class=""><th scope="row">Session 9</th><td id="cell9">Room 9</td></tr><tr id="r10" class=""><th scope="row">Session 10</th><td id="cell10">Room 10</td></tr><tr id="r11" class=""><th scope="row">Session 11</th><td id="cell11">Room 11</td></tr><tr id="r12" class=""><th scope="row">Session 12</th><td id="cell12">Room 12</td></tr></tbody></table></div>
</body></html>

Tất cả bài học trong Mẫu giao diện thích ứng