版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_34169240/article/details/83105486
最近开始搞前端的东西
table的caption 是标题 ,可轻松实现边框上带字的效果
<body>
<div style='border:1px solid black;'>
<table border="1" style='margin-top:-14px;'>
<caption>Monthly savings</caption>
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
<tr>
<td>February</td>
<td>$50</td>
</tr>
</table>
</div>
</body>
效果图: