`

table 边框样式css

    博客分类:
  • CSS
阅读更多
<html>
<body>
    <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>
<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; &lt;td&gt;普&lt;/td&gt; &lt;td&gt;表&lt;/td&gt; &lt;/tr&gt; &lt;tr align=&quot;center&quot;&gt; &lt;td&gt;通&lt;/td&gt; &lt;td&gt;格&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;</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; &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; &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;</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; &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; &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;</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; &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;</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; &lt;td&gt; &lt;table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;1&quot; cellpadding=&quot;0&quot; bgcolor=&quot;#000000&quot;&gt; &lt;tr&gt; &lt;td bgcolor=&quot;#FFFFFF&quot;&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/td&gt; &lt;td&gt; &lt;table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;1&quot; cellpadding=&quot;0&quot; bgcolor=&quot;#000000&quot;&gt; &lt;tr&gt; &lt;td bgcolor=&quot;#FFFFFF&quot;&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;1&quot; cellpadding=&quot;0&quot; bgcolor=&quot;#000000&quot;&gt; &lt;tr&gt; &lt;td bgcolor=&quot;#FFFFFF&quot;&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/td&gt; &lt;td&gt; &lt;table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;1&quot; cellpadding=&quot;0&quot; bgcolor=&quot;#000000&quot;&gt; &lt;tr&gt; &lt;td bgcolor=&quot;#FFFFFF&quot;&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;</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; &lt;td bgcolor=&quot;#B7B7B7&quot; bordercolorlight=&quot;#000000&quot; bordercolordark=&quot;#eeeeee&quot; &gt;立&lt;/td&gt; &lt;td bgcolor=&quot;#B7B7B7&quot; bordercolorlight=&quot;#000000&quot; bordercolordark=&quot;#eeeeee&quot; &gt;表&lt;/td&gt; &lt;/tr&gt; &lt;tr align=&quot;center&quot;&gt; &lt;td bgcolor=&quot;#B7B7B7&quot; bordercolorlight=&quot;#000000&quot; bordercolordark=&quot;#eeeeee&quot; &gt;体&lt;/td&gt; &lt;td bgcolor=&quot;#B7B7B7&quot; bordercolorlight=&quot;#000000&quot; bordercolordark=&quot;#eeeeee&quot; &gt;格&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;</td>
        </tr>
        <tr valign="top">
            <td>
            <table class="FCK__ShowTableBorders" cellspacing="0" cellpadding="0" width="200">
                <tbody>
                    <tr>
                        <td><fieldset style="width: 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; &lt;td&gt;&lt;fieldset style=&quot;width:200&quot; align=&quot;center&quot;&gt; &lt;legend&gt; 无名表格 &lt;/legend&gt; &lt;p align=&quot;right&quot;&gt; &lt;/fieldset&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;</td>
        </tr>
        <tr valign="top">
            <td>
            <table class="FCK__ShowTableBorders" cellspacing="0" cellpadding="0" width="200">
                <tbody>
                    <tr>
                        <td><fieldset style="width: 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; &lt;td&gt; &lt;fieldset style=&quot;width: 200; color: #B7B7B7; border-style: groove&quot; align=&quot;center&quot;&gt; &lt;legend style=&quot;color: blue; border: 1 solid #000000&quot;&gt; 表中表效果Ⅰ&lt;/legend&gt; &lt;br&gt; &lt;/fieldset&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;</td>
        </tr>
        <tr valign="top">
            <td>
            <table class="FCK__ShowTableBorders" width="200">
                <tbody>
                    <tr>
                        <td><fieldset style="width: 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; &lt;td&gt;&lt;fieldset style=&quot;width:200&quot; align=&quot;center&quot;&gt; &lt;legend&gt; &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; &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;</td>
        </tr>
        <tr>
            <td colspan="2"><hr color="#000000" size="1">
              这一节要靠你自己去发现了,因为这样学到的东西才是真正属于自己的(我的一个偷懒的借口)。 我已经在每个表格的下面写出了重点,并在右边给出它的源代码,你可以对照着看。下面还有一 个边框会自己变颜色闪动的表格,有兴趣也研究研究吧 ^o^</td>
        </tr>
    </tbody>
</table>
</body>
</html>

=============================================================================================

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"utf-8" />
<title>坏狼安全网-漂亮CSS Tables</title>
</head>
<style type="text/css">
/* CSS Document */

body {
font: normal 11px auto "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
color: #4f6b72;
background: #E6EAE9;
}

a {
color: #c75f3e;
}

#mytable {
width: 700px;
padding: 0;
margin: 0;
}

caption {
padding: 0 0 5px 0;
width: 700px;
font: italic 11px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
text-align: right;
}

th {
font: bold 11px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
color: #4f6b72;
border-right: 1px solid #C1DAD7;
border-bottom: 1px solid #C1DAD7;
border-top: 1px solid #C1DAD7;
letter-spacing: 2px;
text-transform: uppercase;
text-align: left;
padding: 6px 6px 6px 12px;
background: #CAE8EA  no-repeat;
}
/*power by www.winshell.cn*/
th.nobg {
border-top: 0;
border-left: 0;
border-right: 1px solid #C1DAD7;
background: none;
}

td {
border-right: 1px solid #C1DAD7;
border-bottom: 1px solid #C1DAD7;
background: #fff;
font-size:11px;
padding: 6px 6px 6px 12px;
color: #4f6b72;
}
/*power by www.winshell.cn*/

td.alt {
background: #F5FAFA;
color: #797268;
}

th.spec {
border-left: 1px solid #C1DAD7;
border-top: 0;
background: #fff no-repeat;
font: bold 10px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
}

th.specalt {
border-left: 1px solid #C1DAD7;
border-top: 0;
background: #f5fafa no-repeat;
font: bold 10px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
color: #797268;
}
/*---------for IE 5.x bug*/
html>body td{ font-size:11px;}
body,td,th {
font-family: 宋体, Arial;
font-size: 12px;
}
</style>
<body>
<table id="mytable" cellspacing="0" summary="The technical specifications of the Apple

PowerMac G5 series">
<caption> </caption>
<tr>
<th scope="col">姓名</th>
<th scope="col">年龄</th>
<th scope="col">电话</th>
<th scope="col">居住地点</th>
</tr>
<tr>
<td class="row">badwolf</td>
<td class="row">100</td>
<td class="row">010-110</td>
<td class="row">中国北京</td>
</tr>
<tr>
<td class="row">badwolf</td>
<td class="row">100</td>
<td class="row">010-110</td>
<td class="row">中国北京</td>
</tr>
<tr>
<td class="row">badwolf</td>
<td class="row">100</td>
<td class="row">010-110</td>
<td class="row">中国北京</td>
</tr>
<tr>
<td class="row">badwolf</td>
<td class="row">100</td>
<td class="row">010-110</td>
<td class="row">中国北京</td>
</tr>
</table>

</body>
</html>
分享到:
评论

相关推荐

    table嵌套table边框样式

    在这个`table_style`压缩包中,可能包含了不同样式的示例文件,如使用CSS类来更精确地控制不同表格或单元格的边框样式。例如,你可以为特定表格或单元格定义类,然后在HTML中应用这些类: ```html &lt;table class=...

    CSS设置网页table边框样式.pdf

    在网页设计中,CSS(Cascading Style Sheets)是一种用于控制网页元素呈现方式的语言,其中包括对表格(table)边框样式的设置。本篇将详细解释如何使用CSS来设定网页table的边框样式。 首先,边框宽度是CSS中设置...

    HTML Table 漂亮的CSS

    在网页设计中,HTML表格(Table)是一种常用的数据展示方式,而通过应用合适的CSS(Cascading Style Sheets)样式,我们可以让这些表格看起来更加美观、专业。本资源包"HTML Table 漂亮的CSS"提供了多种独立的CSS...

    漂亮的table样式(内附css)

    "漂亮的table样式(内附css)"这个主题就是围绕如何使用CSS为HTML表格添加吸引力,使其更加美观和专业。 首先,我们需要了解HTML表格的基本结构,它由`&lt;table&gt;`元素开始,然后包含`&lt;tr&gt;`(行)元素,每个`&lt;tr&gt;`中...

    纯css table 样式布局制作人口统计table表格样式代码

    `让表格的边框合并,然后为`&lt;table&gt;`添加边框样式。 ```css table { border-collapse: collapse; border: 1px solid #ddd; } ``` 2. **单元格边框**:为`&lt;td&gt;`和`&lt;th&gt;`添加内边距和边框。 ```css th, td ...

    Table常用的几种CSS样式

    1. **边框样式**: - `border-collapse`: 控制表格边框是否合并。`collapse`将合并相邻单元格的边框,`separate`则保持边框独立。 - `border-spacing`: 设置或获取表格单元格之间的距离。 - `border-color`, `...

    让Table的TD有边框而Table右左没有边框的CSS样式

    比如这样一个CSS 复制代码代码如下: .td3{ font-size: 14px; color: #FFFFFF; background-color: #000000; BORDER-RIGHT: #f6f6f6 1px solid; //显示右边框为1px,如果不想显示就为0px BORDER-TOP: #f9f9f9 0px ...

    好看的css table样式

    9. **自定义边框样式** - 通过`border-radius`设置圆角,增加视觉舒适度。 - `box-shadow`添加阴影效果,使表格更具立体感。 10. **颜色编码** - 根据值大小或类别,使用不同的颜色来区分数据,如颜色渐变或色块...

    CSS样式Table[6] - style-table

    2. **边框样式**: `border`属性可以设置边框的宽度、样式和颜色。例如,`td {border: 1px solid black;}`会给每个单元格添加黑色实线边框。`border-radius`属性则可以为单元格添加圆角。 3. **背景色与文本样式**: ...

    漂亮的table表格样式

    综上所述,创建“漂亮的table表格样式”涉及多个CSS属性的运用,包括颜色、边框、背景、悬停效果以及过渡动画。通过合理组合这些元素,我们可以制作出既美观又实用的HTML表格,提升网页的整体视觉体验。

    CSS.table.rar_Table_css table_table css_表格css

    以下是一些关于"CSS.table.rar_Table_css table_table css_表格css"中涉及的关键知识点: 1. **表格元素基础**: - `&lt;table&gt;`:这是HTML中创建表格的基本标签,用于定义表格的结构。 - `&lt;tr&gt;`:表示表格行(Table...

    CSS表格边框50多种精美标签样式(边框也精彩)

    11. **服务器端技术**:对于jsp和asp开发,可以在后端代码中嵌入CSS,或者通过动态生成CSS代码来实现特定的边框样式,尤其是在需要数据驱动边框样式的情况下。 综上所述,掌握CSS表格边框的样式技巧,可以极大地...

    table边框线属性

    9. 对于嵌套表格,可以通过上述属性独立调整内外表格的边框样式。例如,你可以让外层表格有边框,而内层表格没有边框,或者改变内层表格边框的颜色和宽度,以达到复杂的布局效果。 10. `border-radius` 如果希望...

    html,table常用样式

    /* 边框样式 */ border-color: #666666; /* 边框颜色 */ background-color: #dedede; /* 背景颜色 */ } /* 数据单元格样式 */ table.gridtable td { border-width: 1px; /* 边框宽度 */ padding: 8px; /* 内...

    数据可视化大屏的css背景+边框+demo.rar

    通过调整边框的宽度、颜色和样式(如实线、虚线、点线等),可以增加视觉层次感,使信息更易于阅读和理解。此外,自定义边框还可以用于创建独特的设计风格,使大屏更加酷炫和个性化。 "demo"文件通常包含示例代码或...

    CSS样式TABLE的一些特效

    在这个主题“CSS样式TABLE的一些特效”中,我们将深入探讨如何利用CSS来增强表格的视觉吸引力和交互性。 1. **表格边框与填充** - `border-collapse`: 这个属性用于设置表格单元格之间的边框合并方式。默认情况下...

    table 边框拖动

    在网页设计中,"table 边框拖动"是一个交互性功能,允许用户通过鼠标拖动来调整表格单元格或整个表格的边框...然后查看CSS,了解边框样式及如何定位;最后研究JavaScript代码,理解事件处理和动态调整边框大小的逻辑。

    漂亮的Table CSS

    同时,`border-style`、`border-width`和`border-color`可以自定义边框样式,宽度和颜色。 3. **文字样式**:使用`text-align`和`vertical-align`控制文本在单元格中的对齐方式,比如`text-align: center;`居中对齐...

    表格边框样式大全

    在探讨表格边框样式的全览时,我们深入解析了HTML和CSS中各种边框属性的应用,这不仅包括基本的实线、虚线和点线,还有更复杂的样式如沟槽(groove)、脊状(ridge)、内嵌(inset)和外凸(outset)。以下是对这些...

Global site tag (gtag.js) - Google Analytics