如何使Bootstrap 4与IE9和IE10兼容 [英] How to make Bootstrap 4 compatible with IE9 and IE10

查看:147
本文介绍了如何使Bootstrap 4与IE9和IE10兼容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

哪些polyfill库可用于使Bootstrap 4(或Bootstrap 4的大多数)与IE9配合使用?

Which polyfill libaries can be used to make Bootstrap 4 (or most of Bootstrap 4) work with IE9?

我遇到过这些库:

谢谢.

推荐答案

查看他们的网站,他们建议使用Bootstrap 3来支持IE8-9.

Looking at their website they recommend using Bootstrap 3 for IE8-9 support.

如果需要IE8-9支持,请使用Bootstrap3.Bootstrap3是我们代码中最稳定的版本,我们的团队仍然支持该版本进行重要的错误修正和文档更改.但是,不会添加任何新功能.

If you require IE8-9 support, use Bootstrap 3. It’s the most stable version of our code and is still supported by our team for critical bugfixes and documentation changes. However, no new features will be added to it.

很难用IE9和IE10支持bootstrap 4的原因是它使用了现代的CSS(flexbox)和html5元素.他们没有在CSS中提供后备广告,因此您必须手动添加这些后备广告.

The reason that it is hard to support bootstrap 4 with IE9 and IE10 is that is uses modern css ( flexbox ) and html5 elements. They do not provide fallbacks in their css so you would have to manually add those fallbacks.

请注意,某些CSS3属性和HTML5元素在IE10中不完全受支持,或者需要使用前缀属性才能获得完整功能

Please be aware that some CSS3 properties and HTML5 elements are not fully supported in IE10, or require prefixed properties for full functionality

如何为IE9和IE10修复Bootstrap 4:

How you can fix Bootstrap 4 for IE9 and IE10:

  • Autoprefixer 允许您基于浏览器支持创建后备.但是,这不能解决您所有的问题.
  • HTML 5 shiv 用于旧版浏览器的HTML 5后备广告
  • 在任何地方使用flexbox都需要基于float的后备广告
  • Autoprefixer allows you to create fallbacks based on browser support. This won't fix all of your problems however.
  • HTML 5 shiv a HTML 5 fallback for legacy ie browsers
  • Anywhere flexbox is used will need a float based fallback

您在上面链接到了开源项目引导IE8 ,这可能是您最好的选择,因为为解决您的问题而设计.

You linked above to the open source project Bootstrap IE8 this is probably your best option as it's built to solve your problem.

这篇关于如何使Bootstrap 4与IE9和IE10兼容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆