すごい。
pecopla.net/web-column/table-design
<table>
<thead>
<tr>
<td class="non"></td>
<th scope="col">内容</th>
<th scope="col">価格(月額)</th>
</tr>
</thead>
<tbody>
<tr>
<th>ベーシックプラン</th>
<td data-label="内容" class="txt">はじめての方向け。ベーシックなお試しプラン</td>
<td data-label="価格" class="price">¥3,000</td>
</tr>
<tr>
<th>カスタムプラン</th>
<td data-label="内容" class="txt">必要なものだけ揃えられるカスタムプラン</td>
<td data-label="価格"class="price">¥4,000</td>
</tr>
<tr>
<th>プレミアムプラン</th>
<td data-label="内容" class="txt">全ておまかせのプレミアムプラン</td>
<td data-label="価格"class="price">¥10,000</td>
</tr>
</tbody>
</table>
body {
font-family: "Open Sans", sans-serif;
line-height: 1.25;
}
table {
border-collapse: collapse;
margin: 0 auto;
padding: 0;
width: 650px;
table-layout: fixed;
}
table tr {
background-color: #e6f2f5;
padding: .35em;
border-bottom: 2px solid #fff;
}
table th,
table td {
padding: 1em 10px 1em 1em;
border-right: 2px solid #fff;
}
table th {
font-size: .85em;
}
table thead tr{
background-color: #167F92;
color:#fff;
}
table tbody th {
background: #78bbc7;
color: #fff;
}
.txt{
text-align: left;
font-size: .85em;
}
.price{
text-align: right;
color: #167F92;
font-weight: bold;
}
.non{
background:#fff
}
@media screen and (max-width: 600px) {
table {
border: 0;
width:100%
}
table th{
background-color: #167F92;
display: block;
border-right: none;
}
table thead {
border: none;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
table tr {
display: block;
margin-bottom: .625em;
}
table td {
border-bottom: 1px solid #bbb;
display: block;
font-size: .8em;
text-align: right;
position: relative;
padding: .625em .625em .625em 4em;
border-right: none;
}
table td::before {
content: attr(data-label);
font-weight: bold;
position: absolute;
left: 10px;
color: #167F92;
}
table td:last-child {
border-bottom: 0;
}
table tbody th {
color: #fff;
}
}