twitter-bootstrap Bootstrap 2 或 Bootstrap 3 for IE 7 Performance Wise

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18600914/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 18:14:20  来源:igfitidea点击:

Bootstrap 2 or Bootstrap 3 for IE 7 Performance Wise

performancetwitter-bootstrapinternet-explorer-7twitter-bootstrap-3

提问by cchiera

While I know SO does not like A vs B topics hear me out.

虽然我知道 SO 不喜欢 A vs B 主题,但请听我说。

Bootstrap 3 has just been released with countless improvements. The one potential deal breaker is it drops IE 7 compatibility. For site's that cater to corporate users this unfortunately isn't practical since that in one particular use case is roughly 10% market still.

Bootstrap 3 刚刚发布,并进行了无数改进。一个潜在的交易破坏者是它降低了 IE 7 的兼容性。不幸的是,对于迎合企业用户的网站来说,这是不切实际的,因为在一个特定用例中,大约 10% 的市场仍然存在。

So supporting IE7 is a must which one would think that simply means choosing to stick with Bootstrap 2. However, with this https://github.com/coliff/bootstrap-ie7one can easily add IE7 support back while keeping all the benefits of Bootstrap 3.

所以支持 IE7 是必须的,人们会认为这只是意味着选择坚持使用 Bootstrap 2。但是,有了这个https://github.com/coliff/bootstrap-ie7,你可以轻松地重新添加 IE7 支持,同时保留所有优点引导程序 3.

The one issue their is you must use boxsizing.htc polyfill for IE 7 users (https://github.com/Schepp/box-sizing-polyfill)

他们的一个问题是您必须为 IE 7 用户使用 boxsizing.htc polyfill ( https://github.com/Schepp/box-sizing-polyfill)

So my question would it be better to stick with Bootstrap 2 or switch to Bootstrap 3.0 with boxsizing.htc? B3 with .htc will be slower for the 10% IE7 users than with B2, but if barely noticeable (especially if server is caching) it would be worth it for the benefits to the rest of the 90%.

所以我的问题是坚持使用 Bootstrap 2 还是使用 boxsizing.htc 切换到 Bootstrap 3.0 会更好?对于 10% 的 IE7 用户来说,带有 .htc 的 B3 比带有 B2 的用户要慢,但如果几乎不明显(特别是如果服务器正在缓存),那么对于其余 90% 的用户来说,这是值得的。

If know one knows, the next thing I guess I could test is installing the default B2 and B3 with .htc demo sites and comparing the speeds in IE7.

如果知道的人知道,我想我可以测试的下一件事是使用 .htc 演示站点安装默认的 B2 和 B3,并比较 IE7 中的速度。

PS If there is a better polyfill for adding boxsizing to IE7 than the one listed above performance wise let me know.

PS 如果有比上面列出的性能更好的 polyfill 可以将 boxsizing 添加到 IE7,请告诉我。

回答by user1091949

I faced a similar dilemma with Bootstrap 3/IE7, but landed on a different solution. Like Zout, I couldn't get the patch to work, so I wrote one that doesn't require a polyfill.

我在使用 Bootstrap 3/IE7 时遇到了类似的困境,但找到了不同的解决方案。像 Zout 一样,我无法让补丁工作,所以我写了一个不需要 polyfill 的补丁。

It works by falling back to a Bootstrap 2 type grid system of fluid columns with no padding and a left margin beginning with the second column. In IE7 with Bootstrap 3, my site looks perfect.

它的工作原理是退回到 Bootstrap 2 类型的流体列网格系统,没有填充和从第二列开始的左边距。在带有 Bootstrap 3 的 IE7 中,我的网站看起来很完美。

I've tested it (and it works) with most of the components of Bootstrap. It also includes fixes for IE layout bugs and other odd behaviors.

我已经使用 Bootstrap 的大多数组件对其进行了测试(并且可以正常工作)。它还包括对 IE 布局错误和其他奇怪行为的修复。

I just put it on Github yesterday. Hope it helps:

我昨天刚把它放在 Github 上。希望能帮助到你:

https://github.com/LPology/Bootstrap-IE7Fix

https://github.com/LPology/Bootstrap-IE7Fix

回答by Sina Karimi

Bootstrap 3 has dropped support for IE7 but there is an alternative github repo you can use that supports IE7, it can be found here: https://github.com/coliff/bootstrap-ie7

Bootstrap 3 已经放弃了对 IE7 的支持,但是你可以使用一个支持 IE7 的替代 github 存储库,它可以在这里找到:https: //github.com/coliff/bootstrap-ie7

回答by Zout

It is a complete nightmare to support IE 7 with Bootstrap 3. We tried it and needed to switch back to Bootstrap 2 for our new project.

用 Bootstrap 3 支持 IE 7 完全是一场噩梦。我们尝试过,需要为我们的新项目切换回 Bootstrap 2。

We did try the patches you mentioned.

我们确实尝试了您提到的补丁。

So bottom line: Do you really need to support IE 7, don't use Bootstrap 3.

所以底线:你真的需要支持 IE 7,不要使用 Bootstrap 3。