在Chrome和Safari中与thead进行双边距分隔 [英] Double border-spacing with thead in Chrome and Safari

查看:133
本文介绍了在Chrome和Safari中与thead进行双边距分隔的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个,它使用 thead tbody border-spacing 设置,并且在Chrome和Safari中标题行 em>和剩下的加倍。

I have a table that uses thead and tbody. The table has border-spacing set, and in Chrome and Safari the space between the header row and the rest is doubled.

它被报告为 Chrome问题去年年底,但这是我能找到的唯一参考。

It was reported as an issue for Chrome late last year, but that's the only reference to this I can find.

有没有其他人有过这种情况,或者知道如何解决它?

Has anyone else had this, or know how to get around it?

<table style="border-spacing: 0 5px">
<thead>
    <tr>
        <th>Heading 1</th>
        <th>Heading 2</th>
        <th>Heading 3</th>
    </tr>
</thead>
<tbody>
    <tr>
        <td>Cell 1</td>
        <td>Cell 2</td>
        <td>Cell 3</td>
    </tr>
</tbody>

行等间距)在Firefox中,不知道有关IE。

It displays as expected (all rows equally spaced) in Firefox, not sure about IE.

推荐答案

thead th {position:relative; top:5px;}会做到这一点

thead th {position: relative; top: 5px;} will do it

这篇关于在Chrome和Safari中与thead进行双边距分隔的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆