由于不喜欢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>

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

cnblogs的代码高亮的更多相关文章

  1. Windows Live Writer代码高亮插件对比

    一.Paste ASVisual Studio Code 参考:http://www.cnblogs.com/mikelij/archive/2010/11/13/1876199.html 插件下载: ...

  2. Windows Live Writer教程及代码高亮工具

    十分感谢六仙庵对于Windows Live Writer的教程,方便了编辑与发布,教程地址如下: http://www.cnblogs.com/liuxianan/archive/2013/04/13 ...

  3. 20141127 测试使用Word2013书写博客(代码高亮+公式支持)。

      PS :又经过几次测试,发现用于Word2010的高亮插件在Word2013上排版效果不是很好,慎用.不过公式编辑倒是挺方便的 测试使用Word2013书写博客. 大概一个月前,使用WindowL ...

  4. 使用Open Live Writer 的代码高亮插件体验

    由于windows live writer 2012 已经停止服务,转而推出开源项目Open Live Writer .虽然Open Live Writer 也没怎么更新,官网更是一个插件都没有放出来 ...

  5. Word中使用代码高亮插件

    Word中使用代码高亮插件 1.下载并安装:SyntaxHighlighter4Word.zip 解压,然后双击bin\word2010\Kong.SyntaxHighlighter.Word2010 ...

  6. SyntaxHighlighter 代码高亮极简单配置

    页首Html代码: <!--<link type="text/css" rel="stylesheet" href="https://bl ...

  7. OLW (Open Live Writer)安装代码高亮插件方法(简明)

    1.首先下载OLW代码高亮插件,请点击--->OLW代码高亮插件 2.在你安装OLW的目录下(顺便说一下默认的安装目录为C:\Users\你的用户名\AppData\Local\OpenLive ...

  8. open live write 代码高亮插件的配置和使用

    第一步:下载open live writer插件,下载地址:http://www.cnblogs.com/memento/p/5995173.html 第二步:找到open live writer的安 ...

  9. javascript实现代码高亮-wangHighLighter.js

    1. 引言 (先贴出wangHighLighter.js的github地址:https://github.com/wangfupeng1988/wangHighLighter注意,程序和使用说明的更新 ...

随机推荐

  1. 树剖模板by fcdalao

    #include<bits/stdc++.h> using namespace std; ; *MX]; *MX]; int n,Index,fir[MX],fa[MX],dfn[MX], ...

  2. HDU 2844 二进制优化的多重背包

    Coins Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submi ...

  3. UVA10480:Sabotage(最小割+输出)

    Sabotage 题目链接:https://vjudge.net/problem/UVA-10480 Description: The regime of a small but wealthy di ...

  4. vue2.0基础知识,及webpack中vue的使用

    ## 基础指令 ## [v-cloak]{         Display:none;     }     <p v-cloak>xx{{msg}}xx</p> //解决闪烁问 ...

  5. java三

    1,深复制与浅复制 浅复制:被复制对象的所有变量都含有与原来的对象相同的值,而所有的对其他对象的引用仍然指向原来的对象.换言之,浅复制仅仅复制所考虑的对象,而不复制它所引用的对象. 深复制:被复制对象 ...

  6. JVM 性能排查--汇总

    参考:http://blog.sina.com.cn/s/blog_61d758500102wnus.html

  7. poj1379 Run Away

    传送门:http://poj.org/problem?id=1379 [题解] 题目大意:求(0,0)->(X,Y)内的一个点,使得这个点到给定的n个点的最小距离最大. 模拟退火 一开始可以先把 ...

  8. codevs1063 合并果子 优先队列(小根堆)

    题目传送门 这道题很容易想到优先把两堆重量最小的合并比较优 然后乱搞一下就可以啦 #include<cstdio> #include<cstring> #include< ...

  9. 【eclipse使用git】eclipse使用私钥提交项目

    初次安装git需要配置用户名和邮箱,否则git会提示:please tell me who you are. 你需要运行命令来配置你的用户名和邮箱: $ git config --global use ...

  10. CentOS 7 安装python3.6.1

    说明:CentOS 7最小化安装,默认Python 2.7 ,开发需要安装python3.6.1 . 1.检查python版本 [root@bogon ~]# python -VPython 2.7. ...