Ross Wan's World!

Python, Ajax, PHP and Linux.

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

Posted by Ross Wan 于 2011/08/19

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

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

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

  1. 兰芝 said

    额。这么简单?

发表评论

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 / 更改 )

Google+ photo

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

Connecting to %s

 
%d 博主赞过: