网格 | @media.grid (Media Queries)

  •   CSS 中文开发手册

    网格 | @media.grid (Media Queries) - CSS 中文开发手册

    @media.grid

    该grid CSS @media媒体功能可用于应用基于输出设备是否使用基于位图的基于网格或屏幕的风格。

    语法

    该grid特征被指定为表示输出设备是否基于网格的<mq-boolean>值(0或1)。

    例子

    HTML

    <p class="unknown">I don't know if you're using a grid device. :-(</p>
    <p class="bitmap">You are using a bitmap device.</p>
    <p class="grid">You are using a grid device! Neato!</p>

    CSS

    :not(.unknown) {
      color: lightgray;
    }
    
    @media (grid: 0) {
      .unknown {
        color: lightgray;
      }
    
      .bitmap {
        color: red;
      }
    }
    
    @media (grid: 1) {
      .unknown {
        color: lightgray;
      }
    
      .grid {
        color: red;
      }
    }

    结果

    规范

    Specification

    Status

    Comment

    Media Queries Level 4The definition of 'grid' in that specification.

    Working Draft

    No change.

    Media QueriesThe definition of 'grid' in that specification.

    Recommendation

    Initial definition.

    浏览器兼容性

    Feature

    Chrome

    Firefox (Gecko)

    Internet Explorer

    Opera

    Safari

    Basic support

    (Yes)

    (Yes)

    ?

    (Yes)

    (Yes)

    Feature

    Android

    Firefox Mobile (Gecko)

    IE Mobile

    Opera Mobile

    Safari Mobile

    Basic support

    ?

    ?

    ?

    ?

    ?

  •   CSS 中文开发手册
    转载请保留页面地址:https://www.breakyizhan.com/css/32175.html
    原文地址:https://www.cnblogs.com/breakyizhan/p/13222315.html