SyntaxHighlighter 使用参考(十) – toolbar 属性

属性名默认值说明
toolbar true 该属性用来控制是否在代码块的右上角显示浮动工具栏。博客园屏蔽了这个属性,也就是说如果你在博客园的文章中使用这个属性是没有任何效果的。


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

HTML 代码

<pre class=" cpp; toolbar: true">
#include "stdafx.h"

int _tmain(int argc, _TCHAR* argv[])
{
	_tprintf(_T("Hello World!!!\n"));
	return 0;
}
</pre>

显示效果

#include "stdafx.h"

int _tmain(int argc, _TCHAR* argv[])
{
	_tprintf(_T("Hello World!!!\n"));
	return 0;
}


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

HTML 代码

<pre class=" cpp; toolbar: false">
#include "stdafx.h"

int _tmain(int argc, _TCHAR* argv[])
{
	_tprintf(_T("Hello World!!!\n"));
	return 0;
}
</pre>

显示效果

#include "stdafx.h"

int _tmain(int argc, _TCHAR* argv[])
{
	_tprintf(_T("Hello World!!!\n"));
	return 0;
}

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