让<pre>自动换行

Achilles's picture

在IE中:

word-wrap: break-word;

在firefox中:

white-space: -moz-pre-wrap !important;

-moz-pre-wrap在mozilla网站上已经是废止的了,可是firefox还是非他不可,唉。

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre> <font>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.