• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录

半度微笑

  • 博客园
  • 联系
  • 订阅
  • 管理

公告

View Post

css样式表格设置

如图,怎么把每个单元格之间的白色区间去掉呢

 

CSS控制表格边框样式问题

<html>

<head><title>HTML Table</title></head>

<style type="text/css">

TABLE {

border-collapse: separate;

border: 2px solid blue; }

 

.one{ border-left:none; border-right:1px solid #f00; border-top:1px solid #f00; border-bottom:1px solid #f00;}

</style>

<body>

<table summary="TechRepublic.com - Tables and CSS">

 

<thead><tr>

<thabbr="salesperson" scope="col">Person</th>

<thabbr="sales" scope="col">Sales</th>

</tr></thead>

<tbody><tr>

<td class="one">Mr. Smith</td>

<td>600.00</td>

</tr><tr>

<td>Mr. Jones</td>

<td>0000.00</td>

</tr><tr>

<td>Ms. Williams</td>

<td class="one">0000.00</td>

</tr></tbody>

<tfoot><tr>

<td>Let's sale, sale, sale!</td>

</tr></tfoot></table></body></html>

 

我设置了一个样式one,单元格左边没有边框,上下和右边有边框,颜色你可以自己设置。

posted on 2011-10-12 10:24  半度微笑  阅读(196)  评论(0)    收藏  举报

刷新页面返回顶部
 
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3