【问题标题】:How to detect an IE media query with a max-width property? [duplicate]如何检测具有最大宽度属性的 IE 媒体查询? [复制]
【发布时间】:2020-08-31 05:26:34
【问题描述】:

我有以下测试可以帮助我检测 IE11 中的 CSS 修改......

  @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
    .melement {
      border:solid 1em red;
    }
  }

但是当我尝试检查最大宽度设置时,它无法正常工作......

 @media all and (-ms-high-contrast: none), (-ms-high-contrast: active), (max-width: 550px) {
    .melement {
      border:solid 1em red;
    }
  }

我在我的过程中做错了什么?

谢谢

【问题讨论】:

    标签: css internet-explorer media-queries


    【解决方案1】:

    试试这个:

     @media all and (-ms-high-contrast: none) and (max-width: 550px), 
            all and (-ms-high-contrast: active) and (max-width: 550px) {
        .melement {
          border:solid 1em red;
        }
      }

    Answered here

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-04-12
      • 2012-03-19
      • 2017-07-29
      • 2012-07-09
      • 2018-08-02
      • 2015-06-20
      • 2012-12-12
      相关资源
      最近更新 更多