SyntaxHighlighter 使用参考(四) – collapse 属性

Name(属性名) Value(默认值) Description(描述)
collapse false 该属性用来控制是否代码块是否默认折叠。


例1:collapse: true 的 HTML 代码及显示效果

HTML 代码

<pre class=" cpp; collapse: true">
  hello there! 
  This is collapsed code.
</pre>

显示效果

  hello there! 
  This is collapsed code.

例2:collapse: false 的 HTML 代码及显示效果

HTML 代码

<pre class=" cpp; collapse: false">
  hello there! 
  This is collapsed code.
</pre>

显示效果

  hello there! 
  This is collapsed code.

系列文章索引:http://www.cnblogs.com/duxiuxing/archive/2012/05/29/2524243.html
原文地址:https://www.cnblogs.com/duxiuxing/p/2214335.html