我正在尝试使用带有pre-line值的css white-space属性在div中显示带换行符的文本.这适用于Chrome,Firefox和IE 8,但不适用于IE 7.
例如,
将在Chrome,Firefox和IE 8中显示如下:
CSS has a pretty useful property called white-space that I’m guessing goes unnoticed among CSS beginners.
You can probably live without this property for quite some time,it will come in very handy and you’ll find yourself going back to it over and over again.
但在IE 7中它显示如下:
CSS has a pretty useful property called white-space that I’m guessing goes unnoticed among CSS beginners. You can probably live without this property for quite some time,it will come in very handy and you’ll find yourself going back to it over and over again.
你可以在这里看到它:http://jsfiddle.net/VSQnP/10/.
我已经尝试了pre的值,但是然后文本没有换行并且长行在div的右侧运行,并且预先换行,但是在IE 7中存在相同的问题.
最佳答案