先贴效果图

快速开始
先在html中的定义
<cc1:CloudControl ID="CloudControl1" CloudWidth="400px" CloundHeight="300px" SwfObjectPath="object/swfobject.js" TagCloudPath="object/tagcloud.swf" runat="server" />
这里需要引入两个文件 swfobject.js 和 tagcloud.swf
这里的标签可以自定义 也可以使用XML文件
a) 自定义
EntityTagColllection tags = new EntityTagColllection();
tags.Add("百度", "http://www.baidu.com");
tags.Add("谷歌", "http://www,google.com");
CloudControl1.DefaultTagColor = ColorHelper.StringToColor("#32a0c7");
CloudControl1.Tags = tags;
b) 使用XML文件
CloudControl1.DefaultTagColor = ColorHelper.StringToColor("#32a0c7");
CloudControl1.Tags = tags;
CloudControl1.XmlPath = "tagcloud.xml";
XML文件
<tags> <a href="http://www.roytanck.com/tag/150/" style="font-size: 20pt;" color="0xff0099">$150</a> <a href="http://www.roytanck.com/tag/3d/" style="font-size: 8pt;">3D</a> <a href="http://www.roytanck.com/tag/api/" style="font-size: 9.55556pt;">API</a> </tags>
更多的设置
CloudControl 的详细设置 xmlPath; xml文件的路径 swfObjectPath = "swfobject.js"; swfobject.js文件地址
speed = 100 标签移动速度;
defaultTagColor = Color.Black; 默认标签颜色
Color defaultTagHiColor = Color.Gray; 默认标签选中色
shownWhileUnSupported ="Your brower is not support javascript."; 如浏览器不支持显示的提示
tagCloudPath = "tagcloud.swf"; swfobject.js文件地址
cloudWidth ="100%";控件宽
cloundHeight ="100%";控件高
isTransparent = true;是否透明背景
tags;标签
Tag的详细设置
TagName 标签名字 TagLink 标签链接 TagColor 标签颜色 TagHiColor 标签选中颜色 TagTarget 打开方式 TagFontSize 标签文字大小
这是对wp-cumulus的二次封装 wp-cumulus作者网站http://www.roytanck.com/
浙公网安备 33010602011771号