怎样才能使单元格的左边框变红?为什么这不起作用?谢谢!!
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
.main-table {
border-collapse: collapse;
}
.main-table td {
margin: 0px;
padding: 0px;
border: 1px solid #aaa;
padding: 1px 4px 1px 4px;
}
.left-border {
border-left: 1px solid red !important;
}
</style>
</head>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
左边框不应该覆盖.main-table td上指定的颜色吗?
<table class='main-table' cellspacing='0' cellpadding='0'>
<tr>
<td> 1 </td>
<td> 366 </td>
</tr>
<tr>
<td > 2 </td>
<td class='left-border'> 777 </td>
</tr>
</table>
</body>
</html>
https://stackoverflow.com/questions/8906313
复制相似问题