css

pre小技巧:强制换行与横向滚动条[转]

pre 标签中的代码时常会超出模板的边界,这时我们就得想想办法了:

办法一:强制要出界的代码换行

办法二:即将出界的代码隐藏起来,这时出现横向滚动条

这两个办法均能通过在W3C的CSS检验,方法一已经在本博客代码页面实现。

原帖:http://xizhiabc.info/dev/191-pre-tips-force-line-and-horizontal-scroll-bar

1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.