首页 > 其他 > 详细

解决在用google-code-prettify高亮博客的代码,但是行号怎么也无法显示

时间:2014-09-20 17:03:00      阅读:363      评论:0      收藏:0      [点我收藏+]
在网上查了一下,有一个不太完美的解决办法,就是加入如下代码:
<style>
li.L0, li.L1, li.L2, li.L3, li.L5, li.L6, li.L7, li.L8 {
 list-style-type: decimal !important
}
</style>

然后再将你需要显示的代码里面的<br/>换成回车即可,这样就可以显示出来行号了。
 <pre class="prettyprint pre-scrollable linenums">
   &lt;div class=&quot;span4&quot;&gt;
        &lt;h2 class=&quot;page-header&quot;&gt;区块1&lt;/h2&gt;
            &lt;/div&gt;
         &lt;div class=&quot;span4&quot;&gt;
     &lt;h2 class=&quot;page-header&quot;&gt;区块2&lt;/h2&gt;
 &lt;/div&gt;</pre>

效果如下:
bubuko.com,布布扣

bubuko.com,布布扣

解决在用google-code-prettify高亮博客的代码,但是行号怎么也无法显示

原文:http://blog.csdn.net/shijiebei2009/article/details/39432739

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!