虚线表边框变为实心?

时间:2012-11-01 14:23:05

标签: html css css-tables

见这个例子:

http://jsfiddle.net/sM3hT/

普通表的样式如下:

table {
 width:100%; 
 border-collapse:collapse;
}
td {
  border:1px dashed black;
  padding:5px;
}
th {
 background:orange;
}

您会注意到边框划线没有均匀间隔,有时甚至显示为实线。这是虚线边界固有的东西吗?

我也尝试将虚线边框应用于tr而不是td,认为这些都是相同的长度,因此间距是均匀的,但这也无济于事。

这是不能改变的东西?

注意:这是safari 6,它可能与其他浏览器中宣传的一样。

我已经在一定宽度中包含了它的样子截图:

enter image description here

4 个答案:

答案 0 :(得分:3)

我担心这个问题是相邻单元格的虚线边界或一般相邻元素所固有的。问题是浏览器分别对每个元素的边界进行划线,因此当考虑例如,考虑到例如,破折号通常不会均匀地间隔开。行的单元格边框为一行。

通过使用例如,可以最好地避免该问题。相反,例如浅色的实心边框,例如border: 1px solid gray

答案 1 :(得分:0)

在渲染虚线/虚线边框时,safari中存在小错误 this文章可能/可能没有帮助阅读

答案 2 :(得分:-1)

tr { border-bottom:1px dashed black; }

tr { border-bottom:1px dashed black!important; }

答案 3 :(得分:-1)

虫子消失了:

问题是解决真正的白色扩展列文本至少: 你看这张桌子:

<table class="mytabletable grid" cellpadding="0" cellspacing="0">
    <thead>

        <tr class="header gradient header_padding_0">
            <th class="column_1">
                <div class="column_inner">Analysis</div>
            </th>
            <th class="column_2">
                <div class="column_inner">Effect Size</div>
            </th>
            <th class="column_3">
                <div class="column_inner">Small</div>
            </th>
            <th class="column_4">
                <div class="column_inner">Medium</div>
            </th>
            <th class="column_5">
                <div class="column_inner">Large</div>
            </th>
            <th class="column_6">
                <div class="column_inner">Notes</div>
            </th>
        </tr>
    </thead>
    <tfoot>
        <tr class="border footer_border_top">
            <td colspan="6">
                <div class="column_inner"></div>
            </td>
        </tr>
        <tr class="footer gradient footer_padding_0 hide_border_top_1 hide_border_bottom_1">
            <td class="column_1">
                <div class="column_inner">Chi-Square tests</div>
            </td>
            <td class="column_2">
                <div class="column_inner">Cohen's **w**</div>
            </td>
            <td class="column_3">
                <div class="column_inner">0.10</div>
            </td>
            <td class="column_4">
                <div class="column_inner">0.30</div>
            </td>
            <td class="column_5">
                <div class="column_inner">ampliate</div>
            </td>
            <td class="column_6">
                <div class="column_inner"></div>
            </td>
        </tr>
        <tr class="border footer_border_bottom">
            <td colspan="6">
                <div class="column_inner"></div>
            </td>
        </tr>
        <tr class="sticky-false">
            <td colspan="6"></td>
        </tr>
    </tfoot>
    <tbody>
        <tr class="row_1 row_padding_0 first_row row_odd">
            <td class="column_1 first_column">t-test</td>
            <td class="column_2">Cohen's **d**</td>
            <td class="column_3">0.20</td>
            <td class="column_4">anchor</td>
            <td class="column_5">0.80</td>
            <td class="column_6 last_column"></td>
        </tr>
        <tr class="row_2 row_padding_0  row_even">
            <td class="column_1 first_column">F-test</td>
            <td class="column_2">Cohen's **f**</td>
            <td class="column_3">0.10</td>
            <td class="column_4">0.25</td>
            <td class="column_5">0.40</td>
            <td class="column_6 last_column"></td>
        </tr>
        <tr class="row_3 row_padding_0  row_odd">
            <td class="column_1 first_column">F-test</td>
            <td class="column_2">eta^2</td>
            <td class="column_3">0.01</td>
            <td class="column_4">0.06</td>
            <td class="column_5">0.14</td>
            <td class="column_6 last_column">SPSS provides</td>
        </tr>
        <tr class="row_4 row_padding_0  row_even">
            <td class="column_1 first_column">Correlation</td>
            <td class="column_2">Pearson r</td>
            <td class="column_3">0.10</td>
            <td class="column_4">0.30</td>
            <td class="column_5">0.50</td>
            <td class="column_6 last_column">SPSS provides</td>
        </tr>
        <tr class="row_5 row_padding_0  row_odd">
            <td class="column_1 first_column">Correlation Differences</td>
            <td class="column_2">Cohen's **q**</td>
            <td class="column_3">0.10</td>
            <td class="column_4">0.30</td>
            <td class="column_5">ochenta</td>
            <td class="column_6 last_column">Fisher z transformation</td>
        </tr>
        <tr class="row_6 row_padding_0 last_row  hide_border_bottom_1 row_even">
            <td class="column_1 first_column">Proportions (%s)</td>
            <td class="column_2">Cohen's **h**</td>
            <td class="column_3">0.20</td>
            <td class="column_4">0.50</td>
            <td class="column_5">0.80</td>
            <td class="column_6 last_column">Arcsine transformation</td>
        </tr>
    </tbody>
</table>​