Ross Wan's World!

Python, Ajax, PHP and Linux.

利用 CSS 实现标签 pre 内容自动换行

作者 Ross Wan on 2011/08/19

兼容 IE ,Firefox, Chrome 等浏览器 :)

pre{
    display: block;
    overflow: auto;
    word-wrap:break-word;
    white-space: pre-wrap;
}

一条回应 to “利用 CSS 实现标签 pre 内容自动换行”

  1. 兰芝

    额。这么简单?

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Connecting to %s

 
加关注

Get every new post delivered to your Inbox.