JSFiddle - React, Tailwind, and code Playground
HTML
<div class="layer">
<table class=" fixtable table-body">
<thead class="thead">
<tr class="title-row">
<th class="title-th">Артикул</th>
<th class="title-th">Текущая МРЦ</th>
<th class="title-th">Новая РРЦ</th>
</tr>
</thead>
<tbody class="tbody">
<tr class="table-row">
<td class="td-body">2934/8C</td>
<td class="td-body">20 369,00</td>
<td class="td-body">14 258,30</td>
</tr>
<tr class="table-row">
<td class="td-body">2756/6C</td>
<td class="td-body">16 276,00</td>
<td class="td-body">11 393,20</td>
</tr>
<tr class="table-row">
<td class="td-body">2934/8C</td>
<td class="td-body">20 369,00</td>
<td class="td-body">14 258,30</td>
</tr>
<tr class="table-row">
<td class="td-body">2934/8C</td>
<td class="td-body">20 369,00</td>
<td class="td-body">14 258,30</td>
</tr>
<tr class="table-row">
<td class="td-body">2756/6C</td>
<td class="td-body">16 276,00</td>
<td class="td-body">11 393,20</td>
</tr>
<tr class="table-row">
<td class="td-body">2934/8C</td>
<td class="td-body">20 369,00</td>
<td class="td-body">14 258,30</td>
</tr>
<tr class="table-row">
<td class="td-body">2934/8C</td>
<td class="td-body">20 369,00</td>
<td class="td-body">14 258,30</td>
</tr>
<tr class="table-row">
<td class="td-body">2756/6C</td>
<td class="td-body">16 276,00</td>
<td class="td-body">11 393,20</td>
</tr>
<tr class="table-row">
<td class="td-body">2934/8C</td>
<td class="td-body">20 369,00</td>
<td class="td-body">14 258,30</td>
</tr>
<tr class="table-row">
<td class="td-body">2934/8C</td>
<td class="td-body">20 369,00</td>
<td class="td-body">14 258,30</td>
</tr>
<tr...
SCSS
.fixtable-fixed {
position: sticky;
top: 0;
z-index: 101;
border: 1px solid #5a5959;
background: #d3d6d5;
padding: 5px 10px;
width: 200px;
overflow: hidden;
}
.layer {
overflow: scroll; /* Добавляем полосы прокрутки */
width: 600px; /* Ширина блока */
height: 300px; /* Высота блока */
padding: 5px; /* Поля вокруг текста */
border: solid 1px black; /* Параметры рамки */
}
.scroll-table {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
width: 100%;
font-size: 2.5rem;
margin-top: 10px;
margin-bottom: 15px;
position: relative;
box-sizing: border-box;
}
.thead
{
width: 100%;
max-width: inherit;
position: sticky;
top: 0;
}
.thead-fixed
{
/* position: fixed;
width: 100%;
max-width: inherit;
top:0px; */
}
.preloader_table
{
position: absolute;
background-color: brown;
width: 100%;
height: 100%;
z-index:1000;
}
.scroll-table-body {
/* width:80%; */
color: black;
overflow: auto;
height: 300px;
display: flex;
justify-content: flex-end;
align-items: end;
}
.title-row
{
display: flex;
}
.title-th {
display: flex;
border: 1px solid #5a5959;
background: #d3d6d5;
padding: 5px 10px;
width: 200px;
top: 0;
font-family: 'Roboto-Condensed';
justify-content: center;
align-items: center;
}
.title-th_big {
border: 1px solid #5a5959;
background: #d3d6d5;
padding: 5px 10px;
width: 6.6666%;
}
.title-table {
background: #969595;
color: black;
font-size: 2rem;
}
.table-row > td {
border-right: 1px solid #5a5959;
padding: 5px 10px;
border-bottom: 1px solid #5a5959;
font-size: 1.5rem;
font-family: 'Roboto-Condensed';
}
.table-row {
display: flex;
background: white;
}
.td-body
{
width: 200px;
border: 1px solid #5a5959;
text-align: center;
font-size: 2.3rem;
}
.table-row>.td-body
{
text-align: left;
}
.table-row:nth-child(2n) {
background: #d3d6d5;
}
.table-row:hover {
background-color:...