白色空间:预包装不能在IE中工作 [英] white-space: pre-wrap not working in IE

查看:99
本文介绍了白色空间:预包装不能在IE中工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 white-space:pre-wrap 。内容没有在Quirk模式下被包装在IE中。



有没有解决方案让它在奇怪模式下工作?

怪癖模式是为了向后兼容IE5等非常老的浏览器,它们不符合标准(又名严格)模式。在IE8及更高版本中支持 pre-wrap 属性,但不支持IE 5-7:

http://www.quirksmode.org/css/whitespace.html



在这种情况下,有两种选择:


I am using white-space: pre-wrap. Content is not being wrapped in IE in Quirk mode.

Is there any solution to get it working for quirk mode?

Note: It is working fine in strict mode of IE8 and IE9.

解决方案

Quirks mode is for backwards compatibility with very old browsers like IE5, which do not comply with standards (aka strict) mode. The pre-wrap property is supported in IE8 and higher, but not IE 5-7:

http://www.quirksmode.org/css/whitespace.html

In this situation, there are two options:

  • Don't support browsers that are non-compliant with w3 standards
  • Send incompatible IE versions a different stylesheet using IE conditionals

这篇关于白色空间:预包装不能在IE中工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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