简单教程
提交运行
代码编辑器:
<meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="/static/lib/bootstrap/4.0.0/css/bootstrap.min.css"> <div class="container"> <h2>表格黑色背景</h2> <p>.table-dark CSS 类可以为表格添加黑色背景</p> <table class="table table-dark"> <thead> <tr> <th>姓</th> <th>名</th> <th>朝代</th> </tr> </thead> <tbody> <tr> <td>李</td> <td>白</td> <td>唐</td> </tr> <tr> <td>韩</td> <td>愈</td> <td>唐</td> </tr> <tr> <td>王</td> <td>安石</td> <td>宋</td> </tr> </tbody> </table> </div>
运行结果: