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>
    

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

  • 相关阅读:
    面向对象程序设计寒假作业2
    面向对象程序设计寒假作业1
    自我介绍
    3组-Alpha冲刺-1/6
    3组 需求分析报告
    3组 团队展示
    第一次个人编程作业
    第一次博客作业
    我罗斯方块最终篇
    我罗斯方块设计
  • 原文地址:https://www.cnblogs.com/lazycal/p/3254634.html
Copyright © 2011-2022 走看看