空单元 | empty-cells (Miscellaneous Level 2) – CSS 中文开发手册 – Break易站

空单元 | empty-cells (Miscellaneous Level 2) – CSS 中文开发手册 – Break易站CSS中文开发手册空单元|empty-cells(MiscellaneousLevel2)-CSS中文开发手册empty-cells该empty-cellsCSS属性指定用户端应该如何渲染周围的边框和背景有没有可见的内容的单元格。此属性时才适用border-collapse的

大家好,欢迎来到IT知识分享网。空单元

  •   CSS 中文开发手册

    空单元 | empty-cells (Miscellaneous Level 2) – CSS 中文开发手册

    empty-cells

    该empty-cellsCSS属性指定用户端应该如何渲染周围的边框和背景<table>有没有可见的内容的单元格。此属性时才适用border-collapse的separate。

    /* Keyword values */
    empty-cells: show;
    empty-cells: hide;
    
    /* Global values */
    empty-cells: inherit;
    empty-cells: initial;
    empty-cells: unset;

    Initial value

    show

    应用对象

    table-cell elements

    是否可继承

    yes

    媒体

    visual

    计算值

    as specified

    动画类型

    discrete

    规范顺序

    the unique non-ambiguous order defined by the formal grammar

    语法

    该empty-cells属性被指定为下面列出的关键字值之一。

    show边界和背景像正常区块一样绘制。

    hide没有边界或背景绘制。

    形式语法

    show | hide

    HTML

    <table class="table_1">
      <tr>
        <td>Moe</td>
        <td>Larry</td>
      </tr>
      <tr>
        <td>Curly</td>
        <td></td>
      </tr>
    </table>
    
    <table class="table_2">
      <tr>
        <td>Moe</td>
        <td>Larry</td>
      </tr>
      <tr>
        <td>Curly</td>
        <td></td>
      </tr>
    </table>

    CSS

    .table_1 {
      empty-cells: show;
    }
    
    .table_2 {
      empty-cells: hide;
    }
    
    td,
    th {
      border: 1px solid gray;
      padding: 0.5rem;
    }

    结果

    规范

    Specification

    Status

    Comment

    CSS Level 2 (Revision 1)The definition of ’empty-cells’ in that specification.

    Recommendation

    Initial definition.

    浏览器兼容性

    Feature

    Chrome

    Edge

    Firefox (Gecko)

    Internet Explorer

    Opera

    Safari

    Basic support

    1.0

    (Yes)

    1.0 (1.7 or earlier)

    8.0

    4.0

    1.2

    Feature

    Android

    Edge

    Firefox Mobile (Gecko)

    IE Phone

    Opera Mobile

    Safari Mobile

    Basic support

    1

    (Yes)

    1.0 (1.0)

    8

    6

    3.1

  •   CSS 中文开发手册
  •   本文标题: 空单元 | empty-cells (Miscellaneous Level 2) – CSS 中文开发手册 – Break易站

    转载请保留页面地址:https://www.breakyizhan.com/css/32157.html

    免责声明:本站所有文章内容,图片,视频等均是来源于用户投稿和互联网及文摘转载整编而成,不代表本站观点,不承担相关法律责任。其著作权各归其原作者或其出版社所有。如发现本站有涉嫌抄袭侵权/违法违规的内容,侵犯到您的权益,请在线联系站长,一经查实,本站将立刻删除。 本文来自网络,若有侵权,请联系删除,如若转载,请注明出处:https://yundeesoft.com/34127.html

    (0)
    上一篇 2023-12-29 09:15
    下一篇 2024-01-01 16:45

    相关推荐

    发表回复

    您的电子邮箱地址不会被公开。 必填项已用 * 标注

    关注微信