在一个table中直接定义boder属性与在style中定义boder属性有一些区别,下面我们来具体看一下。
//在table中直接定义boder属性
<table boder='1'><\table>
//在style中定义boder属性
table{
border: 8px double #0000ff;
}
table 中的 border 属性是针对整个 table,所以在 table 上设置了 border 属性,table 中的每一个 td、th 都会有边框;而 css 或者说 style,是只针对单一标签的,所以如果仅仅在 table 标签设定 css 的 border 的话,就只有 table 有边框,里面的 td、th 是没有边框的。
在写的时候可以注意一下这区别。