This article mainly introduces the random and colorful tag tags of jquery to achieve random color and size effect, need friends can refer to the following
jquery random Colorful tag tags random color and size effect JS code: code as follows: <script type= "Text/javascript" src= "Jquery-1.6.4.js" ></script> <script src= "Http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type= " Text/javascript "></script> <script type=" Text/javascript "> $ (document). Ready (Function ( ) { var tags_a = $ ("#tags a"); Tags_a.each (function () { var x = 9; var y = 0; var rand = Pars Eint (Math.random () * (XY + 1) + y); $ (this). AddClass ("tags" +rand); }); }) </script> HTML code: code is as follows: <html> <head> <style> body,a{font-size:13px; a{color: #333333; text-decoration:none;} taglist{Width:250px;overflow:hidden;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{} #tags. Tags1{color: #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;} #tags. Tags6{color: #F06 font-size:20px; #tags. Tags7{color: #030; font-weight:bold; font-size:18px;} #tags. Tags8{color: #F06; font-weight:bold;} #tags. Tags9{color: #C00; font-weight:bold;font-size:16px;} #tags a:hover{color: #F00; text-decoration:underline;} w95{width:95%; margin:0 auto; padding-top:6px; padding-bottom:6px;} TagList .w95{} </style> </head> <body> <div class= "TagList" >& nbsp <div class= ><a href= # >tag tags </a></div> <div class= w95 id= tags > <a href= ' http://www.51xuediannao.com/js/nav/' > navigation menu </a> <a href= ' http://www.51xuediannao.com/ js/slide/' > Focus Slides </a> <a href= ' http://www.51xuediannao.com/js/gg/' > Advertising code </a> <a href= ' http:// www.51xuediannao.com/js/texiao/' > Web effects </a> <a href= ' http://www.51xuediannao.com/js/' >jquery Special effects </a> <a href= ' http://www.51xuediannao.com/js/gundong/' > Scrolling code </a> <a href= ' http:/ /www.51xuediannao.com/tags.php?/%e6%9f%a5%e7%9c%8b%e6%ba%90%e7%a0%81/"> View source </a> <a href=" http ://www.51xuediannao.com/tags.php?/ie7%e5%8f%98%e6%85%a2/">ie7 slow </a> <a href=" http:// www.51xuediannao.com/tags.php?/ET2.0%E9%87%87%E9%9B%86/">et2.0 collection </a> <a href=" http:// www.51xuediannao.com/tags.php?/CSS/">CSS</a> <a href=" http://www.51xuediannao.com/tags.php?/ moss2007/">moss2007</a> <a href=" http://www.51xuediannao.com/tags.php?/MOSS%E6%AF%8D%E7%89%88% e9%a1%b5/">moss master page </a> <a href=" http://www.51xuediannao.com/tags.php?/JS%2BCSS%E5%B9%BB%E7%81% af%e7%89%87/">Js+css Slides </a> <a href= "http://www.51xuediannao.com/tags.php?/%E7%BD%91%E9%A1%B5%E6%BA%90%E7%A0%81 /"> page source </a> <a href=" http://www.51xuediannao.com/tags.php?/%E7%BD%91%E9%A1%B5%E9%85%8D%E8%89% b2/"> Web color </a> <a href=" http://www.51xuediannao.com/tags.php?/301%E9%87%8D%E5%AE%9A%E5%90%91/" >301 redirect </a> <a href= "http://www.51xuediannao.com/tags.php?/JS%2BCSS%E5%88%97%E8%A1%A8/" >js+ CSS list </a> <a href= "http://www.51xuediannao.com/tags.php?/%E9%9A%8F%E6%9C%BA%E6%95%B0/" > Random number < /a> <a href= "http://www.51xuediannao.com/tags.php?/%E4%B8%8B%E6%8B%89%E8%8F%9C%E5%8D%95/" > Pull-down menu </a> </div> </div> </body> </html>