JSFiddle - React, Tailwind, and code Playground
by Pasha
HTML
<div class='list'>
<table>
<tr>
<td>item</td>
</tr>
<tr>
<td>item</td>
</tr>
<tr>
<td>item</td>
</tr>
<tr>
<td>item</td>
</tr>
</table>
</div>
CSS
.list {
height: 112px;
width: 300px;
display: block;
overflow-y: scroll;
}
table tr td {
width: 300px;
height: 50px;
background-color: gray;
border: 1px solid #000;
}
JavaScript
$('.list table tr td:visible').css('background', 'red');