+ -
当前位置:首页 → 问答吧 → 表格去掉边框

表格去掉边框

时间:2011-12-21

来源:互联网

<table cellpadding="0" cellspacing="1" border="0" style="marign-top: 6px; width: 98%;
  vertical-align: text-top; text-align: center; background: #5db2f6; color: #2c67c3">
  <tr style="height: 29px; background: #ddedff; font-size: 12px; text-align: center;">
  <th style="width: 40%;">
  区域名
  </th>
  <th style="width: 42%;">
  &nbsp;区域编码
  </th>
  <th style="width: 16%;">
  操作
  </th>
  </tr>
  <tr style="height: 20px;background:#f7fafd" id="tb_tr" >
  <td style="text-align: left; text-indent: 3px;">
   
  </td>
  <td style="text-align: left; text-indent: 3px;">
   
  </td>
  <td style="text-align: center;">
  </td>

  </tr>
  </table>

怎么把表格最底下那条边框去掉呢?
他是背景叠加的。

作者: b327114069   发布时间: 2011-12-21

border-bottom-style:none

作者: zsx841021   发布时间: 2011-12-21

引用 1 楼 zsx841021 的回复:
border-bottom-style:none


不行

作者: b327114069   发布时间: 2011-12-21

boder=0

作者: gdgis   发布时间: 2011-12-21

你表格上的边框是由于你的表格有background颜色,并且cellspacing="1"。那个框框是由于表格间隙和表格的背景色形成的。

你如果要去掉某一个边的边框,这样做是不行的。

你需要设置cellspacing="0"
然后给th和td加边框即可。另外,为防止td间的双重边框,就只显示一侧的,如:左和上,或者右和下,这样表格的另一侧会没有边框,这时,设置table的那侧边框即可。

作者: yusongkun   发布时间: 2011-12-21