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>
另附去除右侧滚动条的方法:点这里
cnblogs的代码高亮的更多相关文章
- Windows Live Writer代码高亮插件对比
一.Paste ASVisual Studio Code 参考:http://www.cnblogs.com/mikelij/archive/2010/11/13/1876199.html 插件下载: ...
- Windows Live Writer教程及代码高亮工具
十分感谢六仙庵对于Windows Live Writer的教程,方便了编辑与发布,教程地址如下: http://www.cnblogs.com/liuxianan/archive/2013/04/13 ...
- 20141127 测试使用Word2013书写博客(代码高亮+公式支持)。
PS :又经过几次测试,发现用于Word2010的高亮插件在Word2013上排版效果不是很好,慎用.不过公式编辑倒是挺方便的 测试使用Word2013书写博客. 大概一个月前,使用WindowL ...
- 使用Open Live Writer 的代码高亮插件体验
由于windows live writer 2012 已经停止服务,转而推出开源项目Open Live Writer .虽然Open Live Writer 也没怎么更新,官网更是一个插件都没有放出来 ...
- Word中使用代码高亮插件
Word中使用代码高亮插件 1.下载并安装:SyntaxHighlighter4Word.zip 解压,然后双击bin\word2010\Kong.SyntaxHighlighter.Word2010 ...
- SyntaxHighlighter 代码高亮极简单配置
页首Html代码: <!--<link type="text/css" rel="stylesheet" href="https://bl ...
- OLW (Open Live Writer)安装代码高亮插件方法(简明)
1.首先下载OLW代码高亮插件,请点击--->OLW代码高亮插件 2.在你安装OLW的目录下(顺便说一下默认的安装目录为C:\Users\你的用户名\AppData\Local\OpenLive ...
- open live write 代码高亮插件的配置和使用
第一步:下载open live writer插件,下载地址:http://www.cnblogs.com/memento/p/5995173.html 第二步:找到open live writer的安 ...
- javascript实现代码高亮-wangHighLighter.js
1. 引言 (先贴出wangHighLighter.js的github地址:https://github.com/wangfupeng1988/wangHighLighter注意,程序和使用说明的更新 ...
随机推荐
- javascript 随机数区间
生成[0,max]之间的随机数 parseInt(Math.random()*(max+1),10);Math.floor(Math.random()*(max+1)); 生成[1,max]之间的随机 ...
- Angular 遍历循环数组
var app = angular.module('Mywind',['ui.router']) app.controller('Myautumn',function($scope,$http,$fi ...
- Codeforces Round #520 (Div. 2) C. Banh-mi
C. Banh-mi time limit per test:1 second memory limit per test:256 megabytes 题目链接:https://codeforc.es ...
- lvm扩容
111 mkfs -t xfs /dev/sda3 112 pvcreate /dev/sda3 113 vgs 114 vgextend cl /dev/sda3 115 lvscan 116 vg ...
- 使用jQuery发送POST,Ajax请求返回JSON格式数据
问题: 使用jQuery POST提交数据到PHP文件, PHP返回的json_encode后的数组数据,但jQuery接收到的数据不能解析为JSON对象,而是字符串{"code" ...
- VR行业纷纷倒闭:有硬件没内容
从去年年底开始,VR就成为了一个流行词汇,不仅是巨头公司砸钱布局,众多创业公司也纷纷投入其中.但是,一窝蜂拥入的企业基本都没有成熟的商业模式和赢利模式,只能靠融资供血.在资本寒冬中,大部分的VR企业开 ...
- [POJ2135]最小费用最大流
一直由于某些原因耽搁着...最小费用最大流没有搞会. 今天趁着个人状态正佳,赶紧去看看,果然30min不到看会了算法+模板并且A掉了一道题. 感觉最小费用最大流在学过了最大流之后还是挺好理解的.找到从 ...
- DotNETCore 学习笔记 日志
Logging --------------------------------------------------------------------------------------- Impl ...
- 包与time,datetime,random,sys,shutil 模块
一.包 包是什么? 包是一种通过使用‘.模块名’来组织python模块名称空间的方式. 注意: 1. 在python3中,即使包下没有__init__.py文件,import 包仍然不会报错,而在py ...
- 关于hrtimer_forward小段代码的分析【转】
转自:http://blog.csdn.net/wowuyinglingluan/article/details/45720151 版权声明:本文为博主原创文章,未经博主允许不得转载. 目录(?) ...