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

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


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

HTML 代码

<pre class="brush: 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="brush: 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
posted @ 2011-12-22 19:12  杜修杏  阅读(1045)  评论(1编辑  收藏  举报