<div class="table_box">
	<table>
	  <tr>
		<th class="sticky_cross">絶対固定</th>
		<th class="sticky_col">行固定</th>
		<th class="sticky_col">行固定</th>
		<th class="sticky_col">行固定</th>
		<th class="sticky_col">行固定</th>
		<th class="sticky_col">行固定</th>
	  </tr>
	  <tr>
		<th class="sticky_row">列固定</th>
		<td>テキスト</td>
		<td>テキスト</td>
		<td>テキスト</td>
		<td>テキスト</td>
		<td>テキスト</td>
	  </tr>
	  <tr>
		<th class="sticky_row">列固定</th>
		<td>テキスト</td>
		<td>テキスト</td>
		<td>テキスト</td>
		<td>テキスト</td>
		<td>テキスト</td>
	  </tr>
	  <tr>
		<th class="sticky_row">列固定</th>
		<td>テキスト</td>
		<td>テキスト</td>
		<td>テキスト</td>
		<td>テキスト</td>
		<td>テキスト</td>
	  </tr>
	  <tr>
		<th class="sticky_row">列固定</th>
		<td>テキスト</td>
		<td>テキスト</td>
		<td>テキスト</td>
		<td>テキスト</td>
		<td>テキスト</td>
	  </tr>
	</table>
</div>
.table_box{
  max-width: 300px;
  height: 300px;
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
}
th, td {
  vertical-align: middle;
  padding: 20px;
  border: 1px solid #000;
  color: #000;
  font-size: 14px;
  text-align: center;
  white-space: nowrap;
}
th {
  background: #ccc;
}
td {
  background: #fff;
}
.sticky_row {
  position: sticky;
  top: 0;
  left: 0;
  background: none;
  border-left: none;
  border-right: none;
}
.sticky_row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-left: 1px solid #000;
  border-right: 1px solid #000;
  background: #ccc;
  z-index: -1;
}
.sticky_col {
  position: sticky;
  top: 0;
  left: 0;
  background: none;
  border-top: none;
  border-bottom: none;
}
.sticky_col::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
  background: #ccc;
  z-index: -1;
}
.sticky_cross {
  position: sticky;
  top: 0;
  left: 0;
  background: none;
  border-top: none;
  border-bottom: none;
  border-left: none;
  border-right: none;
  z-index: 1;
}
.sticky_cross::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
  border-left: 1px solid #000;
  border-right: 1px solid #000;
  background: #ccc;
  z-index: -1;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.