CSS col col visibility:崩溃在Chrome上不起作用 [英] CSS col visibility:collapse does not work on Chrome

查看:139
本文介绍了CSS col col visibility:崩溃在Chrome上不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在html代码中隐藏一些col。使用MDN colgroup和col被添加,并且我正在玩cols的样式。



< td> 与内容文字可见在所有浏览器中都可见(良好),带有隐藏内容的文字在Chrome中显示(不良)并隐藏在Firefox和Edge中。 (好)。

我可以重新创建问题的最短代码在这里:

 <!doctype html> 
< html>
< head>
< title> css示例< / title>
< style type ='text / css'>
col.visible {}
col.hidden {visibility:collapse; }
< / style>
< / head>
< body>
< table border ='1'>
< colgroup>
< col class ='visible'>
< col class ='hidden'>
< tbody>
< tr>
< td>可见< / td>
< td>隐藏< / td>
< / tr>
< / tbody>
< / colgroup>
< / table>
< / body>
< / html>


解决方案

你说得对,chrome不能正确支持可见性:折叠表格行和列 - 按照错误进行更新。我们计划在未来几个月内处理它,但它可能不会在2017年底之前显现稳定。抱歉的坏消息。


I'm trying to hide some col's in html code. Using MDN colgroup and col are added, and I'm playing with the style of the cols.

The <td> with content text 'visible' is visible in all browsers (good), the with content text 'hidden' is visible in chrome (bad) and hidden in Firefox and Edge. (good).

Shortest code I could re-create problem is here:

<!doctype html>
<html>
    <head>
        <title>css example</title>
        <style type='text/css'>
            col.visible {}
            col.hidden { visibility:collapse; }
        </style>
    </head>
    <body>
        <table border='1'>
            <colgroup>
                <col class='visible'>
                <col class='hidden'>
                <tbody>
                    <tr>
                        <td>visible</td>
                        <td>hidden</td>
                    </tr>
                </tbody>
            </colgroup>
        </table>
    </body>
</html>

解决方案

You are right, chrome doesn't properly support visibility:collapse for table rows and columns -- follow the bug for updates. We are planning on tackling it in the next few months but it probably won't show up in stable until the end of 2017. Sorry about the bad news.

这篇关于CSS col col visibility:崩溃在Chrome上不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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