表格边框未显示?



这是我的HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Credit Balance</title>
<link rel="stylesheet" href="index.css">
</head>
<body>
<h1 id="idInput">Account </h1>
<table>
<thead>
<tr>
<th>Balance</th>
<th>Charges/Credits</th>
</tr>
</thead>
<tbody>
<tr>
<td id="balance">filler</td>
<td id="chargeCredit"> filler</td>
</tr>
</tbody>
</table>
<script src="accountprompt.js"></script>
<script src="index.js"></script>
</body>
</html>

这是CSS

h1 {
font-family: Arial, Helvetica, sans-serif;
text-decoration: underline;
font-weight: 500;
}
table,
th,
td {
border: 1px solid black;
}
table {
border-collapse: collapse;
}
th,
td {
padding: 15px;
text-align: left;
font-weight: lighter;
font-family: Arial, Helvetica, sans-serif;
}

我已经尝试删除我的CSS或JS,但我无法返回边框。。。当我昨晚上床睡觉的时候,我发誓它运行得很好,但我一定编辑了什么就上床睡觉了!

当我去https://jsfiddle.net/6a0opv7d/放上你的代码,我看到了边界。也许你需要清空你的缓存并重新加载。这可以通过在Windows上执行Shift+F5来完成。或者确保你的CSS链接正确,尽管所有其他CSS都在工作。

table, th, td {
border: 1px solid black;
}

最新更新