JSFiddle - React, Tailwind, and code Playground

HTML

<div class="outerDIV">
    <div class="innerDIV">
        <table border="1">
            <thead>
                <tr>
                        <th>Column1</th>
                        <th>Column2</th>
                        <th>Column3</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>Line1Cell1</td>
                    <td>Line1Cell2</td>
                    <td>Line1Cell3</td>
                </tr>
                <tr>
                    <td>Line2Cell1</td>
                    <td>Line2Cell2</td>
                    <td>Line2Cell3</td>
                </tr>
                <tr>
                    <td>Line3Cell1</td>
                    <td>Line3Cell2</td>
                    <td>Line3Cell3</td>
                </tr>
                <tr>
                    <td>Line4Cell1</td>
                    <td>Line4Cell2</td>
                    <td>Line4Cell3</td>
                </tr>
                <tr>
                    <td>Line5Cell1</td>
                    <td>Line5Cell2</td>
                    <td>Line5Cell3</td>
                </tr>
                <tr>
                    <td>Line6Cell1</td>
                    <td>Line6Cell2</td>
                    <td>Line6Cell3</td>
                </tr>
                <tr>
                    <td>Line7Cell1</td>
                    <td>Line7Cell2</td>
                    <td>Line7Cell3</td>
                </tr>
                <tr>
                    <td>Line8Cell1</td>
                    <td>Line8Cell2</td>
                    <td>Line8Cell3</td>
                </tr>
                <tr>
                    <td>Line9Cell1</td>
                    <td>Line9Cell2</td>
                    <td>Line9Cell3</td>
                </tr>
                <tr>
                    <td>Line10Cell1</td>
                    <td>Line10Cell2</td>
                    <td>Line10Cell3</td>
                </tr>
                <tr>
                   ...

CSS

.outerDIV {
    position: relative;
    padding-top: 30px;
    display:inline-block;
}
.innerDIV {
    overflow: auto;
    max-height: 150px;
    padding-right:1.1em;
    margin-right:-1.1em;
}
table thead {
display:table;
    width:100%;
    border:solid 1px gray;
    box-sizing:border-box;
    position: absolute;
    border-bottom:0;
    top: 0;
    left: 0;
    right:0;
}