学习中心 /编程 /Bootstrap5 /基础语法 /表格样式
🅱️ Bootstrap5 基础语法 💾 下载配套软件

表格样式

给 table 加类实现条纹、边框和悬浮效果。

📅 2026-11-23 👁 20 次阅读

本节要解决的问题

给 table 加类实现条纹、边框和悬浮效果。

核心要点

  • table 基础样式
  • table-striped 斑马纹
  • table-hover 行悬浮高亮
<table class="table table-striped table-hover">\n  <thead><tr><th>姓名</th></tr></thead>\n</table>
小屏上给表格外层加 table-responsive 可横向滚动。