<div> <h2><span>热门标签 <img src="images_ex/image_v1/ico_arrow_black.gif" [/color][/b] [b][color=#ff0000]/></span></h2> <ul>{dede:loop table='dede_search_keywords' sort='keyword' row='40' if=''} <li><a class="tag" href="plus/search.php?keyword=[field:keyword/]"> [field:keyword/]</a></li> {/dede:loop}</ul> </div> <script language="javascript"> <!-- var tag_a=document.getElementsByTagName("a"); for( i in tag_a){ var offset=6; var num=4; if(tag_a[i].className=="tag"){ var rnd=Math.ceil((num+offset)*Math.random()); if(rnd>offset){ tag_a[i].className="tag"+(rnd-offset); } } } //--> </script> </div>CSS部分的代码如下:
.tag1 { color:#339900;font-weight:bold;} .tag2 { color:#e65730;} .tag3 { color:#00b9da;} .tag4 { color:#FE3981;font-weight:bold;font-size:14px;}使用说明:
新闻热点
疑难解答