zoukankan      html  css  js  c++  java
  • cnblogs的代码高亮

    由于不喜欢cnblogs原来的代码高亮方案,于是自己瞎搞,外加看这位大神的blog以及BZOJ的代码高亮,终于是搞出来了。。。讲讲怎么弄吧。

    当然对于了解css的大神可以无视以下文字……

    其实就是登上SyntaxHighlighter的官网,点一下右边的download和installation,然后照着做,把shCore.js和shCoreDefault.css和shBrush*****.js传上去,然后改一下页首和页脚html代码就可以了。比如我的页首html代码:

    <!-- Include required JS files -->
    <script type="text/javascript" src="http://files.cnblogs.com/lazycal/shCore.js"></script>
     
    <!--
        At least one brush, here we choose JS. You need to include a brush for every 
        language you want to highlight
    -->
    <script type="text/javascript" src="http://files.cnblogs.com/lazycal/shBrushCpp.js"></script>
    <script type="text/javascript" src="http://files.cnblogs.com/lazycal/shBrushXml.js"></script>
     
    <!-- Include *at least* the core style and default theme -->
    <link href="http://files.cnblogs.com/lazycal/shCoreDefault.css" rel="stylesheet" type="text/css" />
    

      

    页脚html代码

    <script type="text/javascript">
         SyntaxHighlighter.all()
    </script>
    

    另附去除右侧滚动条的方法:点这里

  • 相关阅读:
    LeetCode124 二叉树中的最大路径和
    LeetCode100 相同的树
    LeetCode206 反转链表
    LeetCode460 LFU缓存
    LeetCode876 链表的中间结点
    hdu2767 强连通分量
    hdu1827 强连通分量
    模板 tarjan算法
    hdu2227 树状数组优化dp
    割点和桥
  • 原文地址:https://www.cnblogs.com/lazycal/p/3254634.html
Copyright © 2011-2022 走看看