0

当满足以下条件时,表格右侧会出现一个小间隙:

  • 表格边框大于 1px
  • 边框崩溃是崩溃
  • 浏览器垂直滚动条可见
  • 浏览器是火狐

这是一些示例代码:

<!DOCTYPE html>
<html>

<head>

    <style type="text/css">
        body {background-color:green;}

        table
        {
            background-color:#fff;
            width:600px;
            border-collapse:collapse;
            border:4px solid #222;
            /*border-spacing:0;*/
            margin: 0px auto;
        }

        tr {height:56px;} 

        td
        {
            font-family: trebuchet ms;
            font-size: 10.0pt;
            font-weight:bold;
            border:1px solid #222;
            padding-left:4px;
        }
    </style>

</head>

<body>
    <table>
        <tr >
            <td>some content</td>
            <td>some content</td>
            <td>some content</td>
        </tr>
        <tr >
            <td>some content</td>
            <td>some content</td>
            <td>some content</td>
        </tr>
        <tr >
            <td>some content</td>
            <td>some content</td>
            <td>some content</td>
        </tr>
        <tr >
            <td>some content</td>
            <td>some content</td>
            <td>some content</td>
        </tr>
        <tr >
            <td>some content</td>
            <td>some content</td>
            <td>some content</td>
        </tr>
        <tr >
            <td>some content</td>
            <td>some content</td>
            <td>some content</td>
        </tr>
    </table>
</body>
</html>

任何想法表示赞赏。

4

0 回答 0