Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <table class="table">
- <thead>
- <tr class="table__row table__row_header">
- <th class="table__cell table__cell_header">title 1</th>
- <th class="table__cell table__cell_header">title 2</th>
- <th class="table__cell table__cell_header">title 3</th>
- <th class="table__cell table__cell_header">title 4</th>
- <th class="table__cell table__cell_header">title 5</th>
- </tr>
- </thead>
- <tbody>
- <tr class="table__row table__row_body">
- <td class="table__cell table__cell_body">
- <span class="table__content">text 11</span>
- </td>
- <td class="table__cell table__cell_body">
- <span class="table__content">text 12</span>
- </td>
- <td class="table__cell table__cell_body">
- <div class="table__content">text 13</div>
- </td>
- <td class="table__cell table__cell_body">
- <div class="table__content">text 14</div>
- </td>
- <td class="table__cell table__cell_body">
- <span class="table__content">text 15</span>
- </td>
- </tr>
- <tr class="table__row table__row_body">
- <td class="table__cell table__cell_body">
- <span class="table__content">text 21</span>
- </td>
- <td class="table__cell table__cell_body">
- <span class="table__content">text 22</span>
- </td>
- <td class="table__cell table__cell_body">
- <div class="table__content">text 23</div>
- </td>
- <td class="table__cell table__cell_body">
- <div class="table__content">text 24</div>
- </td>
- <td class="table__cell table__cell_body">
- <span class="table__content">text 25</span>
- </td>
- </tr>
- <tr class="table__row table__row_body">
- <td class="table__cell table__cell_body">
- <span class="table__content">text 31</span>
- </td>
- <td class="table__cell table__cell_body">
- <span class="table__content">text 32</span>
- </td>
- <td class="table__cell table__cell_body">
- <div class="table__content">text 33</div>
- </td>
- <td class="table__cell table__cell_body">
- <div class="table__content">text 34</div>
- </td>
- <td class="table__cell table__cell_body">
- <span class="table__content">text 35</span>
- </td>
- </tr>
- <tr class="table__row table__row_body">
- <td class="table__cell table__cell_body">
- <span class="table__content">text 41</span>
- </td>
- <td class="table__cell table__cell_body">
- <span class="table__content">text 42</span>
- </td>
- <td class="table__cell table__cell_body">
- <div class="table__content">text 43</div>
- </td>
- <td class="table__cell table__cell_body">
- <div class="table__content">text 44</div>
- </td>
- <td class="table__cell table__cell_body">
- <span class="table__content">text 45</span>
- </td>
- </tr>
- <tr class="table__row table__row_body">
- <td class="table__cell table__cell_body">
- <span class="table__content">text 51</span>
- </td>
- <td class="table__cell table__cell_body">
- <span class="table__content">text 52</span>
- </td>
- <td class="table__cell table__cell_body">
- <div class="table__content">text 53</div>
- </td>
- <td class="table__cell table__cell_body">
- <div class="table__content">text 54</div>
- </td>
- <td class="table__cell table__cell_body">
- <span class="table__content">text 55</span>
- </td>
- </tr>
- </tbody>
- </table>
- .table {
- overflow: hidden;
- width: 80%;
- margin: 5px auto 5px auto;
- font-size: 16px;
- cursor: default;
- }
- .table__row {
- position: relative;
- }
- .table__row_body:nth-child(even) {
- background-color: darkgrey;
- }
- .table__row_body:nth-child(odd) {
- background-color: lightgrey;
- }
- .table__cell {
- position: relative;
- padding: 10px;
- border: 10px solid cadetblue;
- border-collapse: collapse;
- }
- .table__cell_header {
- z-index: 20;
- background-color: darkslategrey;
- color: white;
- }
- .table__cell_body:hover:after {
- position: absolute;
- z-index: 10;
- top: -5000px;
- left: 0;
- width: 100%;
- height: 10000px;
- content: "";
- background-color: lightyellow;
- }
- .table__row_body:hover .table__cell_body {
- background-color: lightgoldenrodyellow;
- }
- .table__content {
- position: relative;
- z-index: 20;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement