Home >Web Front-end >HTML Tutorial >Let the
tag text wrap automatically
tag text wrap automatically
也就是说你输入的东西被原封不动的输出,包括你输入的空格之类的,不用 和<BR>等来表示空格或者回车了。
However, by default, the content in the 3b4ad93ea36080674ba857c5f6b82730 tag will not wrap automatically if it exceeds the range, which will cause trouble in display or printing.
The following provides CSS style code that complies with W3C standards and supports multiple browsers:
pre{ white-space:pre-wrap; white-space:-moz-pre-wrap; white-space:-pre-wrap; white-space:-o-pre-wrap; word-wrap:break-word; }
It is best to add a p to the parent tag and set CSSAttribute:
word-wrap: break-word;white-space : normal
The above is the detailed content of Let the
tag text wrap automatically. For more information, please follow other related articles on the PHP Chinese website!