Word中使用代码高亮插件
1.下载并安装:SyntaxHighlighter4Word.zip
解压,然后双击bin\word2010\Kong.SyntaxHighlighter.Word2010.vsto或bin\word2007\Kong.SyntaxHighlighter.Word2007.vsto,即可完成安装,当然前提是你装 了.net framework 4.0。
2.在cnblogs个人设置主页设置代码颜色相间的风格。
页面定制CSS代码:
- #cnblogs_post_body ol
- {
- border: 1px dotted #000066;
- line-height: 150%;
- word-break: break-word;
- font-family: Consolas, Verdana !important;
- border-radius: 5px;
- width: 90%;
- background-color: #E3E3FF;
- list-style-position: outside;
- margin-left: 0px;
- }
- #cnblogs_post_body ol font
- {
- font-size: 12px !important;
- }
- #cnblogs_post_body ol li
- {
- background-color: #fff;
- padding-left: 5px;
- border-left: 1px solid #8A8AFF;
- margin-left: 5px !important;
- }
- #cnblogs_post_body ol li:nth-child(even)
- {
- background-color: #f5f5f5;
- }
来源:Word中使用代码高亮插件 http://www.cnblogs.com/default/archive/2012/06/05/2537225.html