css - 如何通过 CSS 识别 Microsoft Edge 浏览器?

标签 css browser microsoft-edge

我正在开发 Web 应用程序,我需要将 Microsoft Edge 的浏览器与其他浏览器区分开来,以应用独特的样式。有没有办法使用 CSS 来识别 Edge? 就像,

<!--[if IE 11]>
Special instructions for IE 11 here
<![endif]-->

最佳答案

/* Microsoft Edge 浏览器 12-18(Chromium 之前的所有版本)*/

这个应该可以工作:

@supports (-ms-ime-align:auto) {
    .selector {
        property: value;
    }
}

有关更多信息,请参阅:Browser Strangeness

关于css - 如何通过 CSS 识别 Microsoft Edge 浏览器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32201586/

相关文章:

css - 谷歌浏览器错误 - 溢出 :auto | scroll doesn't work

javascript - 如何解决 IE/Edge 中损坏的 removeAttribute?

html - 如何在 Bootstrap 中改变 body 的边界半径

html - 如何在 HTML 中将模式框定位在浏览器之外?

html - Chrome 中不一致的 CSS "invalid property value"

css - 在制作响应式网站时,我们应该保留哪些 CSS 外部媒体查询?小一号还是大一号?

javascript - SVG 中的圆形在 IE 和 Edge 上旋转

css - 与宽度变化相结合时,变换过渡不起作用

css - HTML : How to make mid-row text line up the same as other rows like "tabs"

css - 如何使用 spring mvc 4 在 html 文件中添加 css,js