Apply only to IE 11 within media query for screen size

前端 未结 2 1961
臣服心动
臣服心动 2020-12-10 03:10

I currently have following width specific media query.

 @media only screen and (max-width: 1920px) {
    .toggleMultiSelect .filter {
        width: 566px;
          


        
相关标签:
2条回答
  • 2020-12-10 03:42

    Use the below css inside the media query

    IE 10 and above

    _:-ms-lang(x), .ie10up { 
           property:value; 
        }
    

    IE 11 and above

    _:-ms-fullscreen, :root .CLASS_NAME { 
           property:value; 
         }
    
    0 讨论(0)
  • 2020-12-10 03:49

    Did you try combining them like this -

    @media only screen and (max-width: 1920px) {
        .toggleMultiSelect .filter {
            width: 566px;
        }
        @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
           .toggleMultiSelect .filter {
             width: 575px;
           }
        }
    
     }
    

    This may work am Not sure, am using Mac so no way to test, But I think this will work for you. Hope this was helpful.

    0 讨论(0)
提交回复
热议问题