How to target Microsoft Edge with CSS? [duplicate]

烂漫一生 提交于 2019-11-26 22:37:03

问题


I would like to target Edge and have flexbox behave simliar to Firefox 33 / Chrome, for more detail see this question.

Can one target Edge in CSS?


回答1:


To target Edge, we can check for -ms-ime-align support, Edge being the only Microsoft browser that supports this property:

@supports (-ms-ime-align: auto) {
  .selector {
        color: red;
  }
}

Or this one-liner (that one works on Edge and all IEs also):

_:-ms-lang(x), .selector { color: red; }

Further explanation, including variants to support specific versions of Edge, can be found in this article.



来源:https://stackoverflow.com/questions/32940965/how-to-target-microsoft-edge-with-css

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!