给table添加边框:
table {
border: 1px solid #0f0f0f;
}
这样table的外边框,就出现了,如果同理这样设置table的td,j就会出现双边框的效果,
table td {
border: 1px solid #0f0f0f;
}
解决方案: 只设置td的左、上边框,table的右下边框
table td{
border-left: 1px solid #0f0f0f;
border-top: 1px solid #0f0f0f;
}
table{
border-right: 1px solid #0f0f0f;
border-bottom: 1px solid #0f0f0f;
}
继续设置table 框的属性:style="width:100%;" border="0" cellspacing="1" (设置单元格间距为1像素) cellpadding="0"