<div class="table-wrapper">
<table class="sticky-table">
<thead>
<tr>
<th>Name</th>
<th>Role</th>
<th>Email</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<tr><td>Jane Doe</td><td>Developer</td><td>jane@example.com</td><td>Active</td></tr>
<tr><td>John Smith</td><td>Designer</td><td>john@example.com</td><td>Active</td></tr>
<tr><td>Sam Wilson</td><td>Manager</td><td>sam@example.com</td><td>Away</td></tr>
<tr><td>Alice Cooper</td><td>Support</td><td>alice@example.com</td><td>Offline</td></tr>
<!-- Add more rows to see effect -->
</tbody>
</table>
</div>.table-wrapper {
font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
max-height: 200px;
overflow-y: auto;
border: 1px solid #e5e7eb;
border-radius: 12px;
box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}
.sticky-table {
width: 100%;
border-collapse: collapse;
}
.sticky-table th {
position: sticky;
top: 0;
background: #f9fafb;
color: #374151;
font-weight: 600;
padding: 12px 16px;
text-align: left;
border-bottom: 2px solid #e5e7eb;
z-index: 10;
}
.sticky-table td {
padding: 12px 16px;
border-bottom: 1px solid #f3f4f6;
color: #4b5563;
}
.sticky-table tr:last-child td {
border-bottom: none;
}Nothing to show yetType HTML, CSS or JavaScript and your page appears here.
Click any element to find its code Esc
Check this code before you run it
It came from a shared link. It runs with fewer permissions, so it cannot open pop-ups, submit forms or start downloads.
0.00s / 0.00s
Nothing has animated yet. Hover, click or type in the preview and each CSS animation, transition or
element.animate() call shows up here as it plays.