zoukankan      html  css  js  c++  java
  • table

    <table cellspacing="0" cellpadding="0" rules="none" width="200" border="1">   

    这个表格去掉了单元格之间的纵向分隔线

    这个表格去掉了单元格之间的横向分隔线
      线
      线
    这个表格去掉了单元格之间的纵向分隔线和横向分隔线

      其实上面的三个表格都有三行三列,隐藏分隔线的诀窍在于rules,察看这三个表格的源代码,我们可以看到<TABLE>标签中都有rules。 它有三个参数(cols,rows,none),当rules=cols时,表格会隐藏纵向的分隔线,这样我们就只能看到表格的行;当rules=rows时,则 隐藏了横向的分隔线,这样我们只能看到表格的列;而当rules=none时,纵向分隔线和横向分隔线将全部隐藏。



    二、表格边框的隐藏
    这是一普通的表格

    不怕 下雨
       
    只显示上边框
       
    下起雨来 该怎么办
    只显示下边框

    上不着天  
      下不着地
    只显示左、右边框
      两边走开
    老子姓王  
    只显示上、下边框

    左右  
    为难  
    只显示左边框
      左右
      为难
    只显示右边框

    光秃秃  
      全脱了
    不显示任何边框

    表格边框的显示与隐藏,是可以用frame参数来控制的。请注意它只控制表格的边框图,而不影晌单元格。
    只显示上边框 <table frame=above>
    只显示下边框 <table frame=below>
    只显示左、右边框 <table frame=vsides>
    只显示上、下边框 <table frame=hsides>
    只显示左边框 <table frame=lhs>
    只显示右边框 <table frame=rhs>
    不显示任何边框 <table frame=void>
    三、表格边框
    这是一普通的表格
    <table border="1" width="200" cellpadding="0" cellspacing="0"> <tr align="center">   <td>普</td> <td>表</td> </tr> <tr align="center">   <td>通</td> <td>格</td> </tr> </table>  
    线
    表格加上了漂亮的细线
    (利用cellspacing1像素间隙和表格与单元格背景的不同)
    <table border="0" width="200" cellspacing="1" cellpadding="0" bgcolor="#000000" > <tr align="center" bgcolor="#FFFFFF">   <td bgcolor="#FFFFFF">细</td> <td bgcolor="#FFFFFF">表</td> </tr> <tr align="center" bgcolor="#FFFFFF">   <td bgcolor="#FFFFFF">线</td> <td bgcolor="#FFFFFF">格</td> </tr> </table>  
    线
    这和上面那个可不一样,它用的是CSS,效果却一样。
    (对单元格border的定义)
    <table width="200" cellspacing="0" cellpadding="0"> <tr align="center">   <td style="BORDER-top: rgb(0,0,0) 1px groove; BORDER-bottom: rgb(0,0,0) 1px groove; BORDER-left: rgb(0,0,0) 1px groove; BORDER-right: rgb(0,0,0) 1px groove">细</td> <td style="BORDER-top: rgb(0,0,0) 1px groove; BORDER-bottom: rgb(0,0,0) 1px groove; BORDER-right: rgb(0,0,0) 1px groove">表</td> </tr> <tr align="center">   <td style="BORDER-bottom: rgb(0,0,0) 1px groove; BORDER-left: rgb(0,0,0) 1px groove; BORDER-right: rgb(0,0,0) 1px groove">线</td> <td style="BORDER-bottom: rgb(0,0,0) 1px groove; BORDER-right: rgb(0,0,0) 1px groove">格</td> </tr> </table>  
    线
    再进一步,把边框变成虚线,同样是CSS的神奇作用。
    <table width="200" cellspacing="0" cellpadding="0"> <tr align="center">   <td style="BORDER-top: rgb(0,0,0) 1px dotted; BORDER-bottom: rgb(0,0,0) 1px dotted; BORDER-left: rgb(0,0,0) 1px dotted; BORDER-right: rgb(0,0,0) 1px dotted">细</td> <td style="BORDER-top: rgb(0,0,0) 1px dotted; BORDER-bottom: rgb(0,0,0) 1px dotted; BORDER-right: rgb(0,0,0) 1px dotted">表</td> </tr> <td style="BORDER-bottom: rgb(0,0,0) 1px dotted; BORDER-left: rgb(0,0,0) 1px dotted; BORDER-right: rgb(0,0,0) 1px dotted">线</td> <td style="BORDER-bottom: rgb(0,0,0) 1px dotted; BORDER-right: rgb(0,0,0) 1px dotted">格</td> </tr> </table>  
     
     
     
     
    细线表格的扩展应用,奥妙就是在第个单元格中再套入一个表格。
    <table width="200" border="0" cellspacing="2" cellpadding="0"> <tr>   <td>     <table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="#000000">    <tr>     <td bgcolor="#FFFFFF"> </td>    </tr>    </table> </td> <td>      <table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="#000000">     <tr>      <td bgcolor="#FFFFFF"> </td>     </tr>     </table> </td> </tr> <tr>   <td>       <table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="#000000">      <tr>       <td bgcolor="#FFFFFF"> </td>      </tr>      </table> </td> <td>       <table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="#000000">      <tr>       <td bgcolor="#FFFFFF"> </td>      </tr>      </table> </td> </tr> </table>  
    立体感的表格
    (简单的亮暗边框设置,注意只有IE支持这种效果)
    <table border="1" bordercolorlight="#ffffff" bordercolordark="#ffffff" width="200" cellpadding="0" cellspacing="0"> <tr align="center">   <td bgcolor="#B7B7B7"   bordercolorlight="#000000" bordercolordark="#eeeeee" >立</td> <td bgcolor="#B7B7B7"   bordercolorlight="#000000" bordercolordark="#eeeeee" >表</td> </tr> <tr align="center">   <td bgcolor="#B7B7B7"   bordercolorlight="#000000" bordercolordark="#eeeeee" >体</td> <td bgcolor="#B7B7B7"   bordercolorlight="#000000" bordercolordark="#eeeeee" >格</td> </tr> </table>  
    无名表格

     

    给表格加上一个表头
    (应用<fieldset>和</legend>标签)
    <table width="200" cellpadding="0" cellspacing="0"> <tr>   <td><fieldset style="200" align="center"> <legend> 无名表格 </legend>   <p align="right">   </fieldset></td> </tr> </table>  
    表中表效果Ⅰ
    给表头再加个框
    (用CSS为<legnd>定义一个边框)
    <table width="200"" cellspacing="0" cellpadding="0"> <tr>   <td> <fieldset style=" 200; color: #B7B7B7; border-style: groove" align="center">   <legend style="color: blue; border: 1 solid #000000"> 表中表效果Ⅰ</legend>   <br> </fieldset> </td> </tr> </table>  
    表中表效果Ⅱ

    看起来和上面的一样,可是这个才是真正的表中表哦。
    (在<legnd>中插入一个表格)
    <table width="200"> <tr>   <td><fieldset style="200" align="center"> <legend>   <table style="border: 1 solid #000000" width="80" cellspacing="1" cellpadding="0" height="20"> <tr>   <td><font color=blue>表中表效果Ⅱ</font></td> </tr> </table> </legend><br> </fieldset> </td> </tr> </table>  

      这一节要靠你自己去发现了,因为这样学到的东西才是真正属于自己的(我的一个偷懒的借口)。 我已经在每个表格的下面写出了重点,并在右边给出它的源代码,你可以对照着看。下面还有一 个边框会自己变颜色闪动的表格,有兴趣也研究研究吧 ^o^

    下面来讲讲如何来快速的实现细线表格拉

    。。其实很简单啊。。只要在标题那边嵌入一段小小的CSS就可以实现啦。虽然只能实现细线表格。。但是一目了然。嘻嘻

    <style type="text/css">
    .table1{background:#000000;}
    /* 这边定义了表格的背景,也就是边框的颜色 */
    .table1 td, .table1 th{background:#FFFFFF}
    /* 这边定义了表格内的单元格背景是白色啦,就细线就这样出现啦 */
    </style>
    这边你也可以定义背景为图片啦。不一样的图片会产生不一样的边框样式哦

    <table cellpadding="3" cellspacing="1" border="0" width="200" height="50" class="table1">
    <tr>
    <td></td>
    <td></td>
    </tr>
    <tr>
    <td></td>
    <td></td>
    </tr>
    </table>

    这边的表格结构是不是很清楚啦。。其中关键的是要设置cellspacing为"1"还有就是定义它的class为"table1"。。关键的俩个千万不能忘了哦,不然效果出不来的哦。。

    <table class="t FCK__ShowTableBorders" cellspacing="0" cellpadding="8" width="600" border="0">    
        <tbody>    
            <tr>    
                <td width="220">    
                <table cellspacing="0" cellpadding="0" rules="cols" width="200" border="1">    
                    <tbody>    
                        <tr align="center">    
                            <td></td>    
                            <td></td>    
                            <td></td>    
                        </tr>    
                        <tr align="center">    
                            <td></td>    
                            <td></td>    
                            <td></td>    
                        </tr>    
                        <tr align="center">    
                            <td></td>    
                            <td></td>    
                            <td></td>    
                        </tr>    
                    </tbody>    
                </table>    
                </td>    
                <td width="380">这个表格去掉了单元格之间的纵向分隔线</td>    
            </tr>    
            <tr>    
                <td><br>    
                <table cellspacing="0" cellpadding="0" rules="rows" width="200" border="1">    
                    <tbody>    
                        <tr align="center">    
                            <td></td>    
                            <td></td>    
                            <td></td>    
                        </tr>    
                        <tr align="center">    
                            <td></td>    
                            <td></td>    
                            <td></td>    
                        </tr>    
                        <tr align="center">    
                            <td></td>    
                            <td></td>    
                            <td></td>    
                        </tr>    
                    </tbody>    
                </table>    
                </td>    
                <td>这个表格去掉了单元格之间的横向分隔线</td>    
            </tr>    
            <tr>    
                <td>    
                <table cellspacing="0" cellpadding="0" rules="none" width="200" border="1">    
                    <tbody>    
                        <tr align="center">    
                            <td></td>    
                            <td> </td>    
                            <td>线</td>    
                        </tr>    
                        <tr align="center">    
                            <td></td>    
                            <td> </td>    
                            <td>线</td>    
                        </tr>    
                        <tr align="center">    
                            <td></td>    
                            <td></td>    
                            <td></td>    
                        </tr>    
                    </tbody>    
                </table>    
                </td>    
                <td>这个表格去掉了单元格之间的纵向分隔线和横向分隔线</td>    
            </tr>    
            <tr>    
                <td colspan="2"><hr color="#000000" size="1">    
                  其实上面的三个表格都有三行三列,隐藏分隔线的诀窍在于rules,察看这三个表格的源代码,我们可以看到&lt;TABLE&gt;标签中都有rules。 它有三个参数(cols,rows,none),当rules=cols时,表格会隐藏纵向的分隔线,这样我们就只能看到表格的行;当rules=rows时,则 隐藏了横向的分隔线,这样我们只能看到表格的列;而当rules=none时,纵向分隔线和横向分隔线将全部隐藏。</td>    
            </tr>    
        </tbody>    
    </table>    
    <br>    
    <br>    
    <br>    
    <table class="FCK__ShowTableBorders" height="30" cellspacing="0" cellpadding="0" width="600" border="0">    
        <tbody>    
            <tr>    
                <td><strong>二、表格边框的隐藏</strong></td>    
            </tr>    
        </tbody>    
    </table>    
    <table class="t FCK__ShowTableBorders" cellspacing="0" cellpadding="8" width="600" border="0">    
        <tbody>    
            <tr>    
                <td>    
                <table cellspacing="0" cellpadding="0" width="200" border="1">    
                    <tbody>    
                        <tr align="center">    
                            <td></td>    
                            <td></td>    
                        </tr>    
                        <tr align="center">    
                            <td></td>    
                            <td></td>    
                        </tr>    
                    </tbody>    
                </table>    
                </td>    
                <td>这是一普通的表格</td>    
            </tr>    
            <tr>    
                <td><br>    
                <table cellspacing="0" cellpadding="0" width="200" border="1" frame="above">    
                    <tbody>    
                        <tr align="center">    
                            <td>不怕</td>    
                            <td>下雨</td>    
                        </tr>    
                        <tr align="center">    
                            <td> </td>    
                            <td> </td>    
                        </tr>    
                    </tbody>    
                </table>    
                </td>    
                <td>只显示上边框</td>    
            </tr>    
            <tr>    
                <td>    
                <table cellspacing="0" cellpadding="0" width="200" border="1" frame="below">    
                    <tbody>    
                        <tr>    
                            <td> </td>    
                            <td> </td>    
                        </tr>    
                        <tr>    
                            <td align="center">下起雨来</td>    
                            <td align="center">该怎么办</td>    
                        </tr>    
                    </tbody>    
                </table>    
                </td>    
                <td>只显示下边框</td>    
            </tr>    
            <tr>    
                <td><br>    
                <table cellspacing="0" cellpadding="0" width="200" border="1" frame="vsides">    
                    <tbody>    
                        <tr>    
                            <td align="center">上不着天</td>    
                            <td> </td>    
                        </tr>    
                        <tr>    
                            <td> </td>    
                            <td align="center">下不着地</td>    
                        </tr>    
                    </tbody>    
                </table>    
                </td>    
                <td>只显示左、右边框</td>    
            </tr>    
            <tr>    
                <td>    
                <table cellspacing="0" cellpadding="0" width="200" border="1" frame="hsides">    
                    <tbody>    
                        <tr>    
                            <td> </td>    
                            <td align="center">两边走开</td>    
                        </tr>    
                        <tr>    
                            <td align="center">老子姓王</td>    
                            <td> </td>    
                        </tr>    
                    </tbody>    
                </table>    
                </td>    
                <td>只显示上、下边框</td>    
            </tr>    
            <tr>    
                <td><br>    
                <table cellspacing="0" cellpadding="0" width="200" border="1" frame="lhs">    
                    <tbody>    
                        <tr>    
                            <td width="100">左右</td>    
                            <td width="100"> </td>    
                        </tr>    
                        <tr>    
                            <td>为难</td>    
                            <td> </td>    
                        </tr>    
                    </tbody>    
                </table>    
                </td>    
                <td>只显示左边框</td>    
            </tr>    
            <tr>    
                <td>    
                <table cellspacing="0" cellpadding="0" width="200" border="1" frame="rhs">    
                    <tbody>    
                        <tr>    
                            <td width="100"> </td>    
                            <td align="right" width="100">左右</td>    
                        </tr>    
                        <tr>    
                            <td> </td>    
                            <td align="right">为难</td>    
                        </tr>    
                    </tbody>    
                </table>    
                </td>    
                <td>只显示右边框</td>    
            </tr>    
            <tr>    
                <td><br>    
                <table cellspacing="0" cellpadding="0" width="200" border="1" frame="void">    
                    <tbody>    
                        <tr>    
                            <td align="right">光秃秃</td>    
                            <td> </td>    
                        </tr>    
                        <tr>    
                            <td> </td>    
                            <td align="left">全脱了</td>    
                        </tr>    
                    </tbody>    
                </table>    
                </td>    
                <td>不显示任何边框</td>    
            </tr>    
            <tr>    
                <td colspan="2"><hr color="#000000" size="1">    
                表格边框的显示与隐藏,是可以用frame参数来控制的。请注意它只控制表格的边框图,而不影晌单元格。<br>    
                只显示上边框 &lt;table frame=above&gt;<br>    
                只显示下边框 &lt;table frame=below&gt; <br>    
                只显示左、右边框 &lt;table frame=vsides&gt;<br>    
                只显示上、下边框 &lt;table frame=hsides&gt;<br>    
                只显示左边框 &lt;table frame=lhs&gt;<br>    
                只显示右边框 &lt;table frame=rhs&gt;<br>    
                不显示任何边框 &lt;table frame=void&gt;</td>    
            </tr>    
        </tbody>    
    </table>    
    <p> </p>    
    <p>    
    <table class="FCK__ShowTableBorders" height="30" cellspacing="0" cellpadding="0" width="600" border="0">    
        <tbody>    
            <tr>    
                <td><strong>三、表格边框</strong></td>    
            </tr>    
        </tbody>    
    </table>    
    <table class="t FCK__ShowTableBorders" cellspacing="0" cellpadding="8" width="600" border="0">    
        <tbody>    
            <tr valign="top">    
                <td>    
                <table cellspacing="0" cellpadding="0" width="200" border="1">    
                    <tbody>    
                        <tr align="center">    
                            <td></td>    
                            <td></td>    
                        </tr>    
                        <tr align="center">    
                            <td></td>    
                            <td></td>    
                        </tr>    
                    </tbody>    
                </table>    
                这是一普通的表格</td>    
                <td>&lt;table border=&quot;1&quot; width=&quot;200&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt; &lt;tr align=&quot;center&quot;&gt;&nbsp;&nbsp;  &lt;td&gt;&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr align=&quot;center&quot;&gt;&nbsp;&nbsp;  &lt;td&gt;&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;&nbsp;&nbsp;</td>    
            </tr>    
            <tr valign="top">    
                <td>    
                <table class="FCK__ShowTableBorders" cellspacing="1" cellpadding="0" width="200" bgcolor="#000000" border="0">    
                    <tbody>    
                        <tr align="center" bgcolor="#ffffff">    
                            <td bgcolor="#ffffff"></td>    
                            <td bgcolor="#ffffff"></td>    
                        </tr>    
                        <tr align="center" bgcolor="#ffffff">    
                            <td bgcolor="#ffffff">线</td>    
                            <td bgcolor="#ffffff"></td>    
                        </tr>    
                    </tbody>    
                </table>    
                表格加上了漂亮的细线<br>    
                (利用cellspacing1像素间隙和表格与单元格背景的不同)</td>    
                <td>&lt;table border=&quot;0&quot; width=&quot;200&quot; cellspacing=&quot;1&quot; cellpadding=&quot;0&quot; bgcolor=&quot;#000000&quot; &gt; &lt;tr align=&quot;center&quot; bgcolor=&quot;#FFFFFF&quot;&gt;&nbsp;&nbsp;  &lt;td bgcolor=&quot;#FFFFFF&quot;&gt;&lt;/td&gt; &lt;td bgcolor=&quot;#FFFFFF&quot;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr align=&quot;center&quot; bgcolor=&quot;#FFFFFF&quot;&gt;&nbsp;&nbsp;  &lt;td bgcolor=&quot;#FFFFFF&quot;&gt;线&lt;/td&gt; &lt;td bgcolor=&quot;#FFFFFF&quot;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;&nbsp;&nbsp;</td>    
            </tr>    
            <tr valign="top">    
                <td>    
                <table class="FCK__ShowTableBorders" cellspacing="0" cellpadding="0" width="200">    
                    <tbody>    
                        <tr align="center">    
                            <td style="border-right: rgb(0,0,0) 1px groove; border-top: rgb(0,0,0) 1px groove; border-left: rgb(0,0,0) 1px groove; border-bottom: rgb(0,0,0) 1px groove"></td>    
                            <td style="border-right: rgb(0,0,0) 1px groove; border-top: rgb(0,0,0) 1px groove; border-bottom: rgb(0,0,0) 1px groove"></td>    
                        </tr>    
                        <tr align="center">    
                            <td style="border-right: rgb(0,0,0) 1px groove; border-left: rgb(0,0,0) 1px groove; border-bottom: rgb(0,0,0) 1px groove">线</td>    
                            <td style="border-right: rgb(0,0,0) 1px groove; border-bottom: rgb(0,0,0) 1px groove"></td>    
                        </tr>    
                    </tbody>    
                </table>    
                这和上面那个可不一样,它用的是CSS,效果却一样。<br>    
                (对单元格border的定义)</td>    
                <td>&lt;table width=&quot;200&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt; &lt;tr align=&quot;center&quot;&gt;&nbsp;&nbsp;  &lt;td style=&quot;BORDER-top: rgb(0,0,0) 1px groove; BORDER-bottom: rgb(0,0,0) 1px groove; BORDER-left: rgb(0,0,0) 1px groove; BORDER-right: rgb(0,0,0) 1px groove&quot;&gt;&lt;/td&gt; &lt;td style=&quot;BORDER-top: rgb(0,0,0) 1px groove; BORDER-bottom: rgb(0,0,0) 1px groove; BORDER-right: rgb(0,0,0) 1px groove&quot;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr align=&quot;center&quot;&gt;&nbsp;&nbsp;  &lt;td style=&quot;BORDER-bottom: rgb(0,0,0) 1px groove; BORDER-left: rgb(0,0,0) 1px groove; BORDER-right: rgb(0,0,0) 1px groove&quot;&gt;线&lt;/td&gt; &lt;td style=&quot;BORDER-bottom: rgb(0,0,0) 1px groove; BORDER-right: rgb(0,0,0) 1px groove&quot;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;&nbsp;&nbsp;</td>    
            </tr>    
            <tr valign="top">    
                <td>    
                <table class="FCK__ShowTableBorders" cellspacing="0" cellpadding="0" width="200">    
                    <tbody>    
                        <tr align="center">    
                            <td style="border-right: rgb(0,0,0) 1px dotted; border-top: rgb(0,0,0) 1px dotted; border-left: rgb(0,0,0) 1px dotted; border-bottom: rgb(0,0,0) 1px dotted"></td>    
                            <td style="border-right: rgb(0,0,0) 1px dotted; border-top: rgb(0,0,0) 1px dotted; border-bottom: rgb(0,0,0) 1px dotted"></td>    
                        </tr>    
                        <tr align="center">    
                            <td style="border-right: rgb(0,0,0) 1px dotted; border-left: rgb(0,0,0) 1px dotted; border-bottom: rgb(0,0,0) 1px dotted">线</td>    
                            <td style="border-right: rgb(0,0,0) 1px dotted; border-bottom: rgb(0,0,0) 1px dotted"></td>    
                        </tr>    
                    </tbody>    
                </table>    
                再进一步,把边框变成虚线,同样是CSS的神奇作用。</td>    
                <td>&lt;table width=&quot;200&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt; &lt;tr align=&quot;center&quot;&gt;&nbsp;&nbsp;  &lt;td style=&quot;BORDER-top: rgb(0,0,0) 1px dotted; BORDER-bottom: rgb(0,0,0) 1px dotted; BORDER-left: rgb(0,0,0) 1px dotted; BORDER-right: rgb(0,0,0) 1px dotted&quot;&gt;&lt;/td&gt; &lt;td style=&quot;BORDER-top: rgb(0,0,0) 1px dotted; BORDER-bottom: rgb(0,0,0) 1px dotted; BORDER-right: rgb(0,0,0) 1px dotted&quot;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;td style=&quot;BORDER-bottom: rgb(0,0,0) 1px dotted; BORDER-left: rgb(0,0,0) 1px dotted; BORDER-right: rgb(0,0,0) 1px dotted&quot;&gt;线&lt;/td&gt; &lt;td style=&quot;BORDER-bottom: rgb(0,0,0) 1px dotted; BORDER-right: rgb(0,0,0) 1px dotted&quot;&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;&nbsp;&nbsp;</td>    
            </tr>    
            <tr valign="top">    
                <td>    
                <table class="FCK__ShowTableBorders" cellspacing="2" cellpadding="0" width="200" border="0">    
                    <tbody>    
                        <tr>    
                            <td>    
                            <table class="FCK__ShowTableBorders" cellspacing="1" cellpadding="0" width="100%" bgcolor="#000000" border="0">    
                                <tbody>    
                                    <tr>    
                                        <td bgcolor="#ffffff"> </td>    
                                    </tr>    
                                </tbody>    
                            </table>    
                            </td>    
                            <td>    
                            <table class="FCK__ShowTableBorders" cellspacing="1" cellpadding="0" width="100%" bgcolor="#000000" border="0">    
                                <tbody>    
                                    <tr>    
                                        <td bgcolor="#ffffff"> </td>    
                                    </tr>    
                                </tbody>    
                            </table>    
                            </td>    
                        </tr>    
                        <tr>    
                            <td>    
                            <table class="FCK__ShowTableBorders" cellspacing="1" cellpadding="0" width="100%" bgcolor="#000000" border="0">    
                                <tbody>    
                                    <tr>    
                                        <td bgcolor="#ffffff"> </td>    
                                    </tr>    
                                </tbody>    
                            </table>    
                            </td>    
                            <td>    
                            <table class="FCK__ShowTableBorders" cellspacing="1" cellpadding="0" width="100%" bgcolor="#000000" border="0">    
                                <tbody>    
                                    <tr>    
                                        <td bgcolor="#ffffff"> </td>    
                                    </tr>    
                                </tbody>    
                            </table>    
                            </td>    
                        </tr>    
                    </tbody>    
                </table>    
                细线表格的扩展应用,奥妙就是在第个单元格中再套入一个表格。</td>    
                <td>&lt;table width=&quot;200&quot; border=&quot;0&quot; cellspacing=&quot;2&quot; cellpadding=&quot;0&quot;&gt; &lt;tr&gt;&nbsp;&nbsp;  &lt;td&gt;&nbsp;&nbsp;&nbsp;&nbsp;  &lt;table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;1&quot; cellpadding=&quot;0&quot; bgcolor=&quot;#000000&quot;&gt;&nbsp;&nbsp;&nbsp;  &lt;tr&gt;&nbsp;&nbsp;&nbsp;&nbsp;  &lt;td bgcolor=&quot;#FFFFFF&quot;&gt; &lt;/td&gt;&nbsp;&nbsp;&nbsp;  &lt;/tr&gt;&nbsp;&nbsp;&nbsp;  &lt;/table&gt; &lt;/td&gt; &lt;td&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &lt;table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;1&quot; cellpadding=&quot;0&quot; bgcolor=&quot;#000000&quot;&gt;&nbsp;&nbsp;&nbsp;&nbsp;  &lt;tr&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &lt;td bgcolor=&quot;#FFFFFF&quot;&gt; &lt;/td&gt;&nbsp;&nbsp;&nbsp;&nbsp;  &lt;/tr&gt;&nbsp;&nbsp;&nbsp;&nbsp;  &lt;/table&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;&nbsp;&nbsp;  &lt;td&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &lt;table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;1&quot; cellpadding=&quot;0&quot; bgcolor=&quot;#000000&quot;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &lt;tr&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &lt;td bgcolor=&quot;#FFFFFF&quot;&gt; &lt;/td&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &lt;/tr&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &lt;/table&gt; &lt;/td&gt; &lt;td&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &lt;table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;1&quot; cellpadding=&quot;0&quot; bgcolor=&quot;#000000&quot;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &lt;tr&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &lt;td bgcolor=&quot;#FFFFFF&quot;&gt; &lt;/td&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &lt;/tr&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &lt;/table&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;&nbsp;&nbsp;</td>    
            </tr>    
            <tr valign="top">    
                <td>    
                <table cellspacing="0" bordercolordark="#ffffff" cellpadding="0" width="200" bordercolorlight="#ffffff" border="1">    
                    <tbody>    
                        <tr align="center">    
                            <td bordercolorlight="#000000" bgcolor="#b7b7b7" bordercolordark="#eeeeee"></td>    
                            <td bordercolorlight="#000000" bgcolor="#b7b7b7" bordercolordark="#eeeeee"></td>    
                        </tr>    
                        <tr align="center">    
                            <td bordercolorlight="#000000" bgcolor="#b7b7b7" bordercolordark="#eeeeee"></td>    
                            <td bordercolorlight="#000000" bgcolor="#b7b7b7" bordercolordark="#eeeeee"></td>    
                        </tr>    
                    </tbody>    
                </table>    
                立体感的表格<br>    
                (简单的亮暗边框设置,注意只有IE支持这种效果)</td>    
                <td>&lt;table border=&quot;1&quot; bordercolorlight=&quot;#ffffff&quot; bordercolordark=&quot;#ffffff&quot; width=&quot;200&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt; &lt;tr align=&quot;center&quot;&gt;&nbsp;&nbsp;  &lt;td bgcolor=&quot;#B7B7B7&quot;&nbsp;&nbsp;  bordercolorlight=&quot;#000000&quot; bordercolordark=&quot;#eeeeee&quot; &gt;&lt;/td&gt; &lt;td bgcolor=&quot;#B7B7B7&quot;&nbsp;&nbsp;  bordercolorlight=&quot;#000000&quot; bordercolordark=&quot;#eeeeee&quot; &gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr align=&quot;center&quot;&gt;&nbsp;&nbsp;  &lt;td bgcolor=&quot;#B7B7B7&quot;&nbsp;&nbsp;  bordercolorlight=&quot;#000000&quot; bordercolordark=&quot;#eeeeee&quot; &gt;&lt;/td&gt; &lt;td bgcolor=&quot;#B7B7B7&quot;&nbsp;&nbsp;  bordercolorlight=&quot;#000000&quot; bordercolordark=&quot;#eeeeee&quot; &gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;&nbsp;&nbsp;</td>    
            </tr>    
            <tr valign="top">    
                <td>    
                <table class="FCK__ShowTableBorders" cellspacing="0" cellpadding="0" width="200">    
                    <tbody>    
                        <tr>    
                            <td><fieldset style=" 200px" align="center"><legend>无名表格 </legend>    
                            <p align="right"> </p>    
                            </fieldset></td>    
                        </tr>    
                    </tbody>    
                </table>    
                给表格加上一个表头<br>    
                (应用&lt;fieldset&gt;&lt;/legend&gt;标签)</td>    
                <td>&lt;table width=&quot;200&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt; &lt;tr&gt;&nbsp;&nbsp;  &lt;td&gt;&lt;fieldset style=&quot;200&quot; align=&quot;center&quot;&gt; &lt;legend&gt; 无名表格 &lt;/legend&gt;&nbsp;&nbsp;  &lt;p align=&quot;right&quot;&gt;&nbsp;&nbsp;  &lt;/fieldset&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;&nbsp;&nbsp;</td>    
            </tr>    
            <tr valign="top">    
                <td>    
                <table class="FCK__ShowTableBorders" cellspacing="0" cellpadding="0" width="200">    
                    <tbody>    
                        <tr>    
                            <td><fieldset style=" 200px; color: #b7b7b7; border-top-style: groove; border-right-style: groove; border-left-style: groove; border-bottom-style: groove" align="center"><legend style="border-right: #000000 1px solid; border-top: #000000 1px solid; border-left: #000000 1px solid; color: blue; border-bottom: #000000 1px solid">表中表效果Ⅰ</legend><br>    
                            </fieldset></td>    
                        </tr>    
                    </tbody>    
                </table>    
                给表头再加个框<br>    
                (用CSS为&lt;legnd&gt;定义一个边框)</td>    
                <td>&lt;table width=&quot;200&quot;&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt; &lt;tr&gt;&nbsp;&nbsp;  &lt;td&gt; &lt;fieldset style=&quot; 200; color: #B7B7B7; border-style: groove&quot; align=&quot;center&quot;&gt;&nbsp;&nbsp;  &lt;legend style=&quot;color: blue; border: 1 solid #000000&quot;&gt; 表中表效果Ⅰ&lt;/legend&gt;&nbsp;&nbsp;  &lt;br&gt; &lt;/fieldset&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;&nbsp;&nbsp;</td>    
            </tr>    
            <tr valign="top">    
                <td>    
                <table class="FCK__ShowTableBorders" width="200">    
                    <tbody>    
                        <tr>    
                            <td><fieldset style=" 200px" align="center"><legend>    
                            <table class="FCK__ShowTableBorders" style="border-right: #000000 1px solid; border-top: #000000 1px solid; border-left: #000000 1px solid; border-bottom: #000000 1px solid" height="20" cellspacing="1" cellpadding="0" width="80">    
                                <tbody>    
                                    <tr>    
                                        <td><font color="#0000ff">表中表效果Ⅱ</font></td>    
                                    </tr>    
                                </tbody>    
                            </table>    
                            </legend><br>    
                            </fieldset></td>    
                        </tr>    
                    </tbody>    
                </table>    
                看起来和上面的一样,可是这个才是真正的表中表哦。<br>    
                (在&lt;legnd&gt;中插入一个表格)</td>    
                <td>&lt;table width=&quot;200&quot;&gt; &lt;tr&gt;&nbsp;&nbsp;  &lt;td&gt;&lt;fieldset style=&quot;200&quot; align=&quot;center&quot;&gt; &lt;legend&gt;&nbsp;&nbsp;  &lt;table style=&quot;border: 1 solid #000000&quot; width=&quot;80&quot; cellspacing=&quot;1&quot; cellpadding=&quot;0&quot; height=&quot;20&quot;&gt; &lt;tr&gt;&nbsp;&nbsp;  &lt;td&gt;&lt;font color=blue&gt;表中表效果Ⅱ&lt;/font&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/legend&gt;&lt;br&gt; &lt;/fieldset&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;&nbsp;&nbsp;</td>    
            </tr>    
            <tr>    
                <td colspan="2"><hr color="#000000" size="1">    
                  这一节要靠你自己去发现了,因为这样学到的东西才是真正属于自己的(我的一个偷懒的借口)。 我已经在每个表格的下面写出了重点,并在右边给出它的源代码,你可以对照着看。下面还有一 个边框会自己变颜色闪动的表格,有兴趣也研究研究吧 ^o^</td>    
            </tr>    
            <tr>    
                <td colspan="2">    
                <p> </p>    
                <hr color="#000000" size="1">    
                <strong>下面来讲讲如何来快速的实现细线表格拉</strong>    
                <p> </p>    
                <p>。。其实很简单啊。。只要在标题那边嵌入一段小小的CSS就可以实现啦。虽然只能实现细线表格。。但是一目了然。嘻嘻</p>    
                </td>    
            </tr>    
            <tr>    
                <td>&lt;style type=&quot;text/css&quot;&gt;<br>    
                .table1{background:#000000;}<br>    
                /* 这边定义了表格的背景,也就是边框的颜色 */<br>    
                .table1 td, .table1 th{background:#FFFFFF} <br>    
                /* 这边定义了表格内的单元格背景是白色啦,就细线就这样出现啦 */<br>    
                &lt;/style&gt;<br>    
                这边你也可以定义背景为图片啦。不一样的图片会产生不一样的边框样式哦</td>    
                <td>    
                <p>&lt;table cellpadding=&quot;3&quot; cellspacing=&quot;1&quot; border=&quot;0&quot; width=&quot;200&quot; height=&quot;50&quot; class=&quot;table1&quot;&gt;<br>    
                &lt;tr&gt;<br>    
                &lt;td&gt;&lt;/td&gt;<br>    
                &lt;td&gt;&lt;/td&gt;<br>    
                &lt;/tr&gt;<br>    
                &lt;tr&gt;<br>    
                &lt;td&gt;&lt;/td&gt;<br>    
                &lt;td&gt;&lt;/td&gt;<br>    
                &lt;/tr&gt;<br>    
                &lt;/table&gt;</p>    
                <p>这边的表格结构是不是很清楚啦。。其中关键的是要设置cellspacing为&quot;1&quot;还有就是定义它的class为&quot;table1&quot;。。关键的俩个千万不能忘了哦,不然效果出不来的哦。。</p>    
                </td>    
            </tr>    
        </tbody>    
    </table>   
  • 相关阅读:
    Linux反编译
    函数调用 堆栈
    机器学习经典书籍
    linux kernel系列四:嵌入式系统中的文件系统以及MTD
    Linux Kernel系列三:Kernel编译和链接中的linker script语法详解
    单页面响应式模板:血色圆月
    Disqus评论框改造工程-Jekyll等静态博客实现Disqus代理访问
    25个Web前端开发工程师必看的国外大牛和酷站
    我们是谁? 程序员!
    GitHub万星项目:黑客成长技术清单
  • 原文地址:https://www.cnblogs.com/ribavnu/p/3492399.html
Copyright © 2011-2022 走看看