JQuery implementation refresh random variation style effect (Tag tag style)

TAG label random colorful changing hyperlink style, using JQ + DIV + CSS to realize refresh random variation style effects. JQuery version of the random colorful TAG label random CSS font color and the font size effect. So I wrote this effect with everyone, the way is also awkward, which is to use jQuery random number to traverse all A links in #tag to add a random class name. Then define 12 link patterns in advance. You can customize CSS like #tags .tags1 to achieve the font styles you need. The jQuery random colorful tag label random color and the font size of the TAG label are just written, not beautiful enough.


      body {text-align: center} body, a {font-size: 13px;} a {color: # 333333; text-decoration: none;} .taglist {width: 350px; overflow: hidden; text-align: left Margin: 0 auto; border: #dddddd solid 1px;} .taglist .tit {width: 100%; Height: 24px; line-height: 24px; background-color: # 565662;} .taglist .tit a {padding- Left: 8px; Color: #ffffff;} #tags a {height: 26px; line-height: 26px; padding-right: 6px;} #tags .tags0 {} #cstags1 {} # c00; font-size : 24px;} # #tagS.Tags2 {color: # 030; font-size: 16px;} #tags .tags3 {color: # 00f;} #tags .tags4 {font-size: 16px;} #tags .tags5 {color: # c00; font -size: 20px;} # F06 font-size: 20px;} # 030; font-weight: bold; font-size: 18px;} #tags .tags8 { Color: # f06; font-weight: bold;} # c00; font-weight: bold; font-size: 16px;} # 090; font-weight: bold: bold: bold Font-size: 18px;} #tags .tags11 {color: # 09f;} #tags .tags12 {color: # f90; font-size: 14px;} #tags a: hover {color: # f00; Text-Decoration : underline;} .w95 {width: 95%; Margin: 0 auto; padding-top: 6px; padding-bottom: 6px;} .taglist .w95 {}     $ Document) .read (function () {var tags_a = $ ("# tags a"); tags_a.each (function () {var x = 9; var y = 0; var rand = parseint (Math.random () * (x -Y + 1) + Y); $ (this) .addclass ("tags" + rand);};})     TAG tag   
© Copyright Notice
Just support it if you like
comment Grab the couch

Please log in to comment