zoukankan      html  css  js  c++  java
  • :empty (Selectors) – CSS 中文开发手册

    [
  •   CSS 中文开发手册

    :empty (Selectors) - CSS 中文开发手册

    该:empty伪类代表没有子节点的所有元素。这里只考虑元素节点和文本(包括空格)。注释或处理指令不影响元素是否被认为是空的。

    /* Selects any <div> that contains no content */
    div:empty {
      background: lime;
    }

    语法

    :empty

    实例

    body {
      display: flex;
      justify-content: space-around;
    }
    
    .box {
      background: red;
      height: 100px;
       100px;
    }
    
    .box:empty {
      background: lime;
    }
    <div class="box"><!-- I will be lime --></div>
    <div class="box">I will be red</div>
    <div class="box">
        <!-- I will be red because of the whitespace around this comment -->
    </div>

    规范

    Specification

    Status

    Comment

    Selectors Level 4The definition of ':empty' in that specification.

    Working Draft

    No change

    Selectors Level 3The definition of ':empty' 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)

    9.0

    9.5

    3.1

    Feature

    Android

    Edge

    Firefox Mobile (Gecko)

    IE Mobile

    Opera Mobile

    Safari Mobile

    Basic support

    2.1

    (Yes)

    1.0 (1)

    9.5

    10.0

    3.1

  •   CSS 中文开发手册
    ]
    转载请保留页面地址:https://www.breakyizhan.com/css/31213.html
  • 相关阅读:
    Sigmoid函数
    Softmax分类器
    正则化惩罚项
    损失函数
    交叉验证
    超参数
    IMAGENET
    hdu 2767 Proving Equivalences 强连通
    hdu 4587 TWO NODES 关节点
    hdu 3635 Dragon Balls 并查集
  • 原文地址:https://www.cnblogs.com/breakyizhan/p/13257620.html
Copyright © 2011-2022 走看看