我正在设计一个必须支持 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/