The content in the <pre> tag implements automatic line wrapping (no automatic line wrapping by default)

Automatic line wrapping through css:

pre{
white-space: pre-wrap;           /* css-3 */
white-space: -moz-pre-wrap;      /* Mozilla, since 1999 */
white-space: -pre-wrap;          /* Opera 4-6 */
white-space: -o-pre-wrap;        /* Opera 7 */
word-wrap: break-word;           /* Internet Explorer 5.5+ */
}

The <pre> element defines preformatted text. Whitespace and line breaks are normally preserved for text enclosed in a pre element. The text will also be rendered in a monospaced font


A common use of the <pre> tag is to represent the source code of a computer.



Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325555590&siteId=291194637