如何检测具有最大宽度属性的IE媒体查询? [重复]

问题描述 投票:0回答:1

我有以下测试可帮助我检测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个回答
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

© www.soinside.com 2019 - 2024. All rights reserved.