診療時間表
スマホでも崩れない診療時間テーブル。休診マスは自動でグレー表示になります。
コード・使い方を見る
<div class="ht-wrap">
<table class="ht-table">
<caption>診療時間</caption>
<thead>
<tr><th>診療時間</th><th>月</th><th>火</th><th>水</th><th>木</th><th>金</th><th>土</th><th>日祝</th></tr>
</thead>
<tbody>
<tr>
<th>9:00〜12:30</th>
<td>●</td><td>●</td><td>●</td><td>●</td><td>●</td><td>●</td><td class="ht-off">-</td>
</tr>
<tr>
<th>14:30〜18:30</th>
<td>●</td><td>●</td><td class="ht-off">-</td><td>●</td><td>●</td><td>▲</td><td class="ht-off">-</td>
</tr>
</tbody>
</table>
<p class="ht-note">▲ 土曜午後は 14:00〜17:00 / 休診日:水曜午後・日曜・祝日</p>
</div> .ht-wrap {
--ht-accent: #2f8f9d; /* メインカラー(医院のテーマ色に変更してください) */
--ht-off-bg: #f3f4f6; /* 休診マスの背景色 */
font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
max-width: 640px;
margin: 0 auto;
}
.ht-table { width: 100%; border-collapse: collapse; background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.06); border-radius: 10px; overflow: hidden; }
.ht-table caption { font-weight: 700; font-size: 1.05rem; color: var(--ht-accent); padding: .6em; letter-spacing: .1em; }
.ht-table th, .ht-table td { border: 1px solid #e5e7eb; padding: .65em .4em; text-align: center; font-size: .92rem; }
.ht-table thead th { background: var(--ht-accent); color: #fff; font-weight: 600; }
.ht-table tbody th { background: #fafafa; font-weight: 600; white-space: nowrap; }
.ht-table td { color: var(--ht-accent); font-weight: 700; }
.ht-table td.ht-off { background: var(--ht-off-bg); color: #b0b6bd; font-weight: 400; }
.ht-note { font-size: .8rem; color: #6b7280; margin-top: .6em; text-align: center; }
@media (max-width: 480px) {
.ht-table th, .ht-table td { padding: .5em .25em; font-size: .8rem; }
}