【发布时间】:2021-08-19 14:51:05
【问题描述】:
创建简单边框时遇到问题
第 2 行和最后一行的边框看起来很粗,为什么会这样
注意:当回到 w3school 教程时发现同样的问题,我认为这就像浏览器问题
///// Css代码///////
table{ border-collapse :collapse;}
Table, td { border: 1px solid black;
//// HTML 代码 /////
<table>
<tr>
<th>Firstname</th>
<th>Lastname</th>
</tr>
<tr>
<td>Peter</td>
<td>Griffin</td>
</tr>
<tr>
<td>Lois</td>
<td>Griffin</td>
</tr>
</table>
【问题讨论】:
-
看起来是浏览器渲染问题。你能提供 w3schools 的链接吗?
-
将
Table, td { border: 1px solid black;更改为td,th { border: 1px solid black; -
W3school 链接:w3schools.com/css/…
-
thead和tbody不见了 -
@mister Jojo
未在代码中找到,但我尝试过但无法正常工作
标签: javascript html css bootstrap-4