前言
之前因为有需要,就对代码高亮这块儿特别关注了下,然后发现插件有很多,花了一段时间功夫,对各个不同的代码高亮插件都过了一遍,现将其都总结了下。
贴代码
highlight
1 |
|
prettify
1 |
|
prism
1 |
|
rainbow
1 |
|
SyntaxHighlighter
1 |
|
效果展示
highlight
http://github.ifdream.xin/demo/highlight/highlightDemo.html
prettify
http://github.ifdream.xin/demo/prettify/prettifyDemo.html
prism
http://github.ifdream.xin/demo/prism/prismDemo.html
rainbow
http://github.ifdream.xin/demo/rainbow/rainbowDemo.html
SyntaxHighlighter
http://github.ifdream.xin/demo/SyntaxHighlighter/SyntaxHighlighterDemo.html
资源文件链接
highlight
1 | http://github.ifdream.xin/css/highlight/default.css |
prettify
1 | http://github.ifdream.xin/css/prettify/prettify.css |
prism
1 | http://github.ifdream.xin/css/prism/prism.css |
rainbow
1 | http://github.ifdream.xin/css/rainbow/kimbie-light.css |
SyntaxHighlighter
1 | http://github.ifdream.xin/css/SyntaxHighlighter/css.zip |
结语
以上纯属博主自己整理总结,若有纰漏或有错误,欢迎读者留言指出,本博客将定址更新!