css - 为 IE11 的新应用程序打扰网格

标签 css internet-explorer-11 css-grid

我正在设计一个必须支持 IE11(以及 Chrome 和 Firefox)的新内部网络应用程序。我喜欢在 Grid 中进行布局,但必须弄清楚如何在 IE11 中进行最简单的工作可能会很痛苦。我应该使用 CSS Grid 和 ms- 前缀,还是避免头痛而只为此传递 Grid?

最佳答案

简而言之,这在很大程度上取决于您的应用程序的外观。 This article很好地描述了您可能面临的问题 - 我完全同意总结:

If you are using Grid in a very simple way, and positioning items rather than using auto-placement then the fact that grid exists in Internet Explorer from version 10 could turn out very useful. You could certainly use this in order to create a simpler layout for IE10 and up, once Grid is shipped in other browsers.

However be aware that this is going to require some additional testing and work, you are unlikely to be able to simply rely on Autoprefixer to run and do the work for you. For example, if you have used auto placement for any item and then don’t set a position using the -ms properties, that item is going to stack up with any other unpositioned items in the first grid cell.

关于css - 为 IE11 的新应用程序打扰网格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50989451/

相关文章:

jquery 按钮内容更改并再次返回

css - 伪元素 :before absolute position issue in IE9 and Firefox, Chrome 可以

css - 我可以在不对每个行元素应用样式的情况下隐藏网格行吗?

html - 如果位置固定,如何使元素与其父元素一样宽

javascript - 在 IE 10+ 上,在 iFrame 中读取时 document.referrer 是否会为空?

javascript - Visual Studio 2013 + IE11 调试在启动时挂起

html - CSS - 背景颜色在 IE11 中不起作用

html - CSS - 无论 flexbox 属性如何,文本在顶部对齐

html - 如何在 css 网格单元格中定位元素?

html - 对齐 3 block 等间距框的 css 问题