admin avatar

让pre 里面的内容自动换行的css 兼容各种浏览器

🕘 by admin

让pre 里面的内容自动换行的css 兼容各种浏览器

CSS: pre-wrap
1
2
3
4
5
6
7
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+ */
}

Tyler Longren http://www.longren.org/wrapping-text-inside-pre-tags/

💘 相关文章

写一条评论

Based on Golang + fastHTTP + sdb | go1.18.2 Processed in 0ms