1、先看有间距的布局效果:

2、少说多做,直接看代码(代码中有注释)

 <!DOCTYPE html>
<html lang="zh"> <head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>有间距的表格布局</title>
<style type="text/css">
* {
margin: 0;
padding: 0;
} table {
width: 500px;
margin-top: 30px;
border-collapse: separate;
/*关键设置:间距5px*/
border-spacing: 5px;
/*均匀分布效果*/
table-layout: fixed;
} table th {
height: 44px;
font-size: 18px;
color: #fff;
text-align: center;
background-color: #1262a2;
} table td {
height: 44px;
font-size: 16px;
color: #000;
text-align: center;
background-color: #e5e5e5;
}
</style>
</head> <body>
<table> <thead>
<tr>
<th>部门</th>
<th>联系方式</th>
</tr>
</thead>
<tbody>
<tr> <td>综合办公室</td><br />
<td>65892365<br />35093269(FAX)</td>
</tr>
<tr> <td>党群工作部</td>
<td>65895682</td>
</tr>
<tr>
<td>财务会计处</td>
<td>55216949</td>
</tr>
<tr>
<td>业务监管处</td>
<td>65896474</td>
</tr>
<tr>
<td>指挥中心</td>
<td>65899627<br />65899367(FAX)</td>
</tr>
<tr>
<td>航交所办事处</td>
<td>55130093<br />63233775(FAX)</td>
</tr>
<tr>
<td>政务中心</td>
<td>65355597<br />65890958(FAX)</td>
</tr>
<tr>
<td>上海海事局政务中心<br />浦东分中心 </td>
<td>50151950<br />50151952(FAX)</td>
</tr>
<tr>
<td>第一执法大队</td>
<td>65892051</td>
</tr>
<tr>
<td>第二执法大队</td>
<td>55899652<br />55895608(FAX)</td>
</tr>
<tr>
<td>第三、第四执法大队</td>
<td>65894772</td>
</tr>
<tr>
<td>高桥石化签证点</td>
<td>58616257<br />58674012(FAX)</td>
</tr>
<tr>
<td>第二执法大队</td>
<td>55899652<br />55895608(FAX)</td>
</tr>
<tr>
<td>第三、第四执法大队</td>
<td>65894772</td>
</tr>
<tr>
<td>高桥石化签证点</td>
<td>58616257<br />58674012(FAX)</td>
</tr>
</tbody>
</table>
</body> </html>

有间距的表格布局 table布局的更多相关文章

  1. 网页布局——table布局

    table 的特性决定了它非常适合用来做布局,并且表格中的内容可以自动居中,这是之前用的特别多的一种布局方式 而且也加入了 display:table;dispaly:table-cell 来支持 t ...

  2. ExtJS 布局-Table布局(Table layout)

    更新记录: 2022年6月1日 开始. 2022年6月10日 发布. 1.说明 table布局类似表格,通过指定行列数实现布局. 2.设置布局方法 在父容器中指定 layout: 'table' la ...

  3. Android表格布局(Table Layout)

    Android表格布局(Table Layout) 先来看布局管理器之间继承关系图: 图1 可知TableLayout继承了LinearLayout,所以表格布局本质上依然是线性管理器. 表格布局采用 ...

  4. html5: table表格与页面布局整理

    传统表格布局之table标签排版总结:   默认样式: <style> table { max-width: 800px; border-spacing: 2px; border-coll ...

  5. html页面布局之table布局:

    table布局: table来做整体页面的布局,布局技巧归纳如下: (1)按照设计图的尺寸设置表格的宽高以及单元格的宽高 (2)将表格的border.cellpadding.cellspacing全部 ...

  6. css Table布局:基于display:table的CSS布局

    两种类型的表格布局 你有两种方式使用表格布局 -HTML Table(<table>标签)和CSS Table(display:table 等相关属性). HTML Table是指使用原生 ...

  7. table布局 height=100%无效分析

    (从死了一次又一次终于挂掉的百度空间中抢救出来的,发表日期 2014-08-11) 原文链接:http://www.cnblogs.com/gaojun/archive/2012/05/07/2487 ...

  8. 日历控件table布局

    作为初学者,一开始就接触div+css ,所以说实话,我并不怎么喜欢table布局,一般逃避. 先上这次的效果图: 看到这个图,第一次用table布局没实现,原因是给tr加下边框失效.当时没找到原因, ...

  9. css table 布局

    使用CSS表格 CSS表格能够解决所有那些我们在使用绝对定位和浮动定位进行多列布局时所遇到的问题.例如,“display:table;”的CSS声明能够让一个HTML元素和它的子节点像table元素一 ...

随机推荐

  1. windows下git命令的使用

    一.写在前面 关于git,出于自己的爱好,前段时间玩了一下,也自己上网查了一下资料,现简单记录一下,以备查看. 当然,本文并不是介绍配置git服务器的文章,而是以github服务器作为git的远程仓库 ...

  2. WordPress Permissions Update Error [RESOLVED]

    Recently I ran into an issue where an installation of WordPress that had never had any issues updati ...

  3. Android - Mount a Samba share

    Mount Manager, Cifs manager :Manage your CIFS/NFS network shares was working, but the command from t ...

  4. AWR--service statistics

    近期发现一个奇怪的现象,数据库报告上看负载非常高.可是cpu和等待事件都非常低,不知道消耗的资源跑到哪里去了? Snap Id Snap Time Sessions Cursors/Session B ...

  5. windows设置共享

    设置共享: 添加用户 点击添加 设置权限 然后别人就可以查看了. 查看共享: 删除共享:

  6. MVC文件上传04-使用客户端jQuery-File-Upload插件和服务端Backload组件实现多文件异步上传

    本篇使用客户端jQuery-File-Upload插件和服务端Badkload组件实现多文件异步上传.MVC文件上传相关兄弟篇: MVC文件上传01-使用jquery异步上传并客户端验证类型和大小  ...

  7. java转换emoji表情

    /** * @Description 将字符串中的emoji表情转换成可以在utf-8字符集数据库中保存的格式(表情占4个字节,需要utf8mb4字符集) * @param str * 待转换字符串 ...

  8. Arcgis10.5 python按属性分割图层,属性相同分为一个图层

    # coding=utf-8 """ Source code for potential gp tool to create outputs based on attri ...

  9. 企业应用:C/S 开发需要考虑的事项

    备注 几乎没有做过 C/S 方面的开发(有 RIA 方面的开发经验),此文纯属个人胡思乱想,写下来是希望朋友们多给点意见. C/S 开发注意事项 C/S 开发需要注意如下几点: 采用何种模式组织 UI ...

  10. .NET:CLR via C# Exceptions and State Management

    重点学习的个概念 unhandled exceptions constrained execution regions code contracts runtime wrapped exception ...