对table的设置及打印分页

来源:互联网 发布:淘宝网页版电脑版卖家 编辑:程序博客网 时间:2024/05/17 21:48

来自:http://www.w3school.com.cn/index.html

 

正确的引入 style:  <link rel="stylesheet" type="text/css" href="mystyle.css">

 

1.empty-cells: 属性设置是否显示表格中的空单元格(仅用于“分离边框”模式)。

<table cellpadding="0" cellspacing="0" style="width:25CM;BORDER-COLLAPSE: collapse; empty-cells: show" >

</table>

 

2.设置打印分页:

  说明:page-break-after:always   控制分页

  .pageSeparator{visibility:hidden; page-break-after:always; overflow:hidden; height:0px;}

  <div class="pageSeparator"></div>

 

3.设置细边框 table

 

   .trborder {
        border-collapse:collapse;borderer:none;
        height:0.9CM
    }
    .trborder td{
        border:solid #FF3366 1px;
        font-size: 14px;
    }

  <table cellpadding="0" cellspacing="0" style="width:25CM;BORDER-COLLAPSE: collapse; empty-cells: show" >

     <tr class="trborder">

          <td>细边框</td>

          <td>细边框</td>

     </tr>

     <tr class="trborder">

          <td>细边框</td>

          <td>细边框</td>

     </tr>

  </table>

 

 

4.<pre></pre>: 标签很适合显示计算机代码.

原创粉丝点击