table border 和css border的区别

时间:2014-05-18 15:23:31   收藏:0   阅读:306
<table width="98px" height="50px" style=" border:solid 1px blue;"  >
        <tr>
            <td colspan="2">1</td>
            
        </tr>
        <tr>
            <td>1</td>
            <td style="font-weight: 700">2</td>
        </tr>
    </table>
    <p style=" border:outset 3px gray;" >cool</p>
    <table width="98px" height="50px" border="1px" bordercolor="blue"  >
        <tr>
            <td colspan="2">1</td>
            
        </tr>
        <tr>
            <td>1</td>
            <td style="font-weight: 700">2</td>
        </tr>
    </table>


bubuko.com,布布扣

border 属性规定规定围绕表格的边框的宽度。

border 属性会为每个单元格应用边框,并用边框围绕表格。如果 border 属性的值发生改变,那么只有表格周围边框的尺寸会发生变化。表格内部的边框则是 1 像素宽。

提示:设置 border="0",可以显示没有边框的表格。

从实用角度出发,最好不要规定边框,而是使用 CSS 来添加边框样式和颜色


table border 和css border的区别,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!