简体   繁体   English

空格:预包装在IE中不起作用

[英]white-space: pre-wrap not working in IE

I am using white-space: pre-wrap . 我正在使用white-space: pre-wrap Content is not being wrapped in IE in Quirk mode. 在Quirk模式下,内容未包含在IE中。

Is there any solution to get it working for quirk mode? 是否有任何解决方案让它适用于怪异模式?

Note: It is working fine in strict mode of IE8 and IE9. 注意:它在IE8和IE9的严格模式下工作正常。

Quirks mode is for backwards compatibility with very old browsers like IE5, which do not comply with standards (aka strict) mode. Quirks模式用于与不符合标准(也称为严格)模式的IE5等非常老的浏览器向后兼容。 The pre-wrap property is supported in IE8 and higher, but not IE 5-7: IE8及更高版本支持pre-wrap属性,但不支持IE 5-7:

http://www.quirksmode.org/css/whitespace.html 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 不支持不符合w3标准的浏览器
  • Send incompatible IE versions a different stylesheet using IE conditionals 使用IE条件将不兼容的IE版本发送到不同的样式表

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM