使用CSS隐藏单元格边框 [英] hide cells border using css

查看:434
本文介绍了使用CSS隐藏单元格边框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想隐藏表格单元格的边框.

I want to hide border of cell of a table .

如何使用CSS做到这一点? 如图所示,我需要隐藏标记的边框(如第三和第二行).

How to do it using css ? As it shows, I need to hide the marked borders (as in third and second rows).

推荐答案

<style>
table {
    border: 1px solid black;
    width:100%;
}
table tr {
    border: 1px solid black;
}
table th {
    border: none;
}
</style>

<table>
  <thead>
    <tr>
      <th class="col1">1</th>
      <th class="col2">2</th>
      <th class="col3">3</th>
    </tr>
  </thead>
</thead>

请参阅此处: http://jsfiddle.net/AhHFP/

这篇关于使用CSS隐藏单元格边框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆