Css ie仅限最小宽度的样式

Css ie仅限最小宽度的样式,css,media-queries,Css,Media Queries,如何将仅ie的媒体查询与最小宽度的媒体查询相结合(我知道ie是唯一不支持嵌套媒体查询的浏览器)-对于我使用的ie @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {} 所以我想我能做到 @media screen and (min-width: 1024px) and (-ms-high-contrast: active), (-ms-high-contrast: none) {} 但这仍然在下

如何将仅ie的媒体查询与最小宽度的媒体查询相结合(我知道ie是唯一不支持嵌套媒体查询的浏览器)-对于我使用的ie

@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {}
所以我想我能做到

@media screen and (min-width: 1024px) and (-ms-high-contrast: active), (-ms-high-contrast: none) {}
但这仍然在下面应用
1024px
。如何组合最小宽度和ie媒体查询,使其仅在ie中应用于1024px以上


(我本来打算编写一个代码片段,但它们在ie中不起作用,所以如果您需要更多信息,请告诉我,但上面的代码足以复制我的问题)

您使用了逗号,其作用类似于

@media screen and (-ms-high-contrast: active), 
                  (-ms-high-contrast: none) {}
因此,当

@media screen and (-ms-high-contrast: active)

如果要添加另一个条件,则需要添加两次

@media screen and (min-width: 1024px) and (-ms-high-contrast: active), 
       screen and (min-width: 1024px) and (-ms-high-contrast: none) {}


(不确定是否需要同时检查
屏幕
两次,我在@04FS注释后加入了下面的内容)

我可能有误解,但您是否还需要检查第二次查询的最小宽度
(-ms高对比度:…)和(最小宽度:…)
?啊,愚蠢的盲目复制和粘贴-从来不知道媒体查询中的逗号意味着一个单独的查询,当它允许时,我会接受,谢谢!
屏幕
是否也应添加两次?否则,第二部分将适用于任何媒体。(不确定这是否与他们的情况有关,或者这是否可能与最初的黑客行为有关。)我想这就是让我困惑的原因,因为屏幕不在第二部分,所以我只是认为这是同一媒体查询的一部分,再次感谢
@media screen and (min-width: 1024px) and (-ms-high-contrast: active), 
       screen and (min-width: 1024px) and (-ms-high-contrast: none) {}