1. Go to the "Management> Configuration" panel.
2. In the "customize page style through CSS" text box, add:
Copy codeThe Code is as follows:
/*********** Tag cloud css ****************/
# TagCloud {
Text-align: center;
Overflow: hidden;
}
# TagCloud {
Padding: 0 5px;
Line-height: 1.5em;
Display: inline-block;
}
3. In the "footer Html code" text box, add:
Copy codeThe Code is as follows:
<Script>
/*********** Tag cloud script ****************/
If ($ ("# taglist"). length> 0)
{
Var dict = {};
$ ("# Taglist td"). has ("a"). has ("span"). each (function (I, x ){
Dict [$ ("a", this ). text ()] = $ ("span", this ). text (). replace (/[) (]/g ,"");
});
$ ("<Div>"). attr ("id", "tagCloud"). appendTo ("div # mainContent ");
For (var k in dict)
{
Var sz = (dict [k] * 4) + 12;
$ ("<A> ")
. Attr ("href", "http://www.cnblogs.com/k-sharp/tag/" + escape (k) + "/")
. Attr ("title", dict [k])
. Css ("font-size", sz + "px ")
. Text (k)
. AppendTo ("# tagCloud ");
}
$ ("# Taglist"). remove ();
}
</Script>