好嘞!我把“文章一览(表格)”做成一个独立组件,样式外链到 styles/,运行效果对齐你给的截图(表头+斑马纹+标题为蓝色可点、右侧分类/日期)。


使用步骤(3 步就好)

  1. 新建样式:styles/article-list.css(见下文)。
  2. 新建演示页或插入到首页:article-list.html(见下文)。
  3. 如需从表格标题跳到你的两篇详情页,已把第 1、2 行链接到

A. 最小可运行页:article-list.html

<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <title>文章一览(表格示例)</title>
  <link rel="stylesheet" href="styles/article-list.css" />
</head>
<body>
  <main class="wrap">
    <h2 class="block-title">文章一览(表格示例)</h2>

    <section id="post-table" class="table-wrap">
      <table class="post-table">
        <colgroup>
          <col style="width:80px" />
          <col />
          <col style="width:140px" />
          <col style="width:160px" />
        </colgroup>
        <thead>
          <tr>
            <th>编号</th>
            <th>标题</th>
            <th>分类</th>
            <th>发布日期</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td class="no">1</td>
            <td class="title">
              <a href="post-datail-flex.html">从“能看网页”到“能做网页”</a>
            </td>
            <td class="cat">入门</td>
            <td class="date">2024-10-01</td>
          </tr>
          <tr>
            <td class="no">2</td>
            <td class="title">
              <a href="post-datail-10min.html">从毛坯房到“能家”:用三剑客读懂网页的魔法</a>
            </td>
            <td class="cat">入门</td>
            <td class="date">2024-11-12</td>
          </tr>
          <tr>
            <td class="no">3</td>
            <td class="title">
              <a href="#">从有意思到有意义</a>
            </td>
            <td class="cat">分享</td>
            <td class="date">2025-08-17</td>
          </tr>
          <tr>
            <td class="no">4</td>
            <td class="title">
              <a href="#">Web 前端技术:无处不在的数字魔法</a>
            </td>
            <td class="cat">入门</td>
            <td class="date">2025-08-20</td>
          </tr>
        </tbody>
      </table>
    </section>
  </main>
</body>
</html>


B. 样式:styles/article-list.css

:root{
  --text:#0f172a;
  --muted:#475569;
  --link:#2563eb;
  --line:#e5e7eb;
  --row:#f3f4f6;      /* 斑马纹行色 */
}

*{ box-sizing:border-box; }
body{
  margin:0;
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,"PingFang SC","Microsoft YaHei",sans-serif;
  color:var(--text);
  background:#fff;
}
.wrap{ max-width:1080px; margin:0 auto; padding:24px; }

.block-title{ font-size:20px; margin:8px 0 16px; }

.table-wrap{ overflow-x:auto; background:#fff; border-radius:10px; }

.post-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  font-size:16px;
}

.post-table thead th{
  text-align:left;
  color:var(--muted);
  font-weight:600;
  padding:12px 16px;
  border-bottom:1px solid var(--line);
}

.post-table tbody td{
  padding:14px 16px;
  border-bottom:1px solid var(--line);
  vertical-align:middle;
}

/* 斑马纹 + 行 hover */
.post-table tbody tr:nth-child(even){ background:var(--row); }
.post-table tbody tr:hover{ filter:brightness(0.98); }

/* 各列细化 */
.no{ font-weight:700; font-size:18px; color:var(--text); }
.title a{ color:var(--link); text-decoration:none; }
.title a:hover{ text-decoration:underline; }

/* 小屏优化:适度缩小字号与内边距 */
@media (max-width:600px){
  .post-table{ font-size:15px; }
  .post-table thead th, .post-table tbody td{ padding:10px 12px; }
}


C. 作为“组件片段”嵌入到现有首页

如果你要把它放到现有页面(比如 index.html 或 article-cards.html)里,只需:

  1. 在 <head> 引入:

    <link rel="stylesheet" href="styles/article-list.css">
    
    
  2. 在合适位置粘贴 <section id="post-table" …>…</section> 这一段即可(保留 h2 看你需要)。


可选小改