Often see the home page of the PC end of the block will have some similar to the "clouds" like the label (a tag), the mouse will move up slightly floating, each load, color is not the same, curious, try to write a, help friends to do a similar related links, it appears more attractive.
The structure (HTML) code is as follows:
<div id= "tagslist" >
<a href= "#" title= " by sub-window " > via sub-window </a>
<a href= "#" title= " Marketing Health " > Marketing Health </a>
<a href= "#" title= " Marketing Health " > Marketing Health </a>
<a href= "#" title= "KPI topic " >KPI Special Topics </a>
<a href= "#" title= "KPI topics " >kpi topics </a>
<a href= "#" title= " by sub-window " > via sub-window </a>
<a href= "#" title= " Marketing Health " > Marketing Health </a>
<a href= "#" title= "KPI topic " >KPI Special Topics </a>
</div>
The behavior (jquery) code is as follows:
$ (' #tagsList a '). each (function (index, Element) {
var Color_arr = ["#ff7f80", "#eeb92b", "#2884d7", "#ff7e12"];
var n = (Math.floor (math.random () *color_arr.length));
$ (this). CSS ({color:color_arr[n]});
});
/* math.random (): Get 0~1 Random number */
/ *Math.floor (Math.random ()) : Gets the integer in the range you want * /
This article is from the "Traveler's Only Waiting" blog, so be sure to keep this source http://sunnyyeyuzhu.blog.51cto.com/6793234/1628953
3D Cloud Label