-
<div class="box"> <h3 class="modname"><span class="more"><a href="misc.php?mod=tag">tag列表<em>>></em></a></span>标签</h3> <div class="sidebar_tag_box"> <!--{loop $sidebar_tags $sidebar_tag}--> <!--{eval $color1 = rand(1,255); $color2 = rand(1,255); $color3 = rand(1,255); $color4 = rand(1,255);}--> <a href="misc.php?mod=tag&id=$sidebar_tag[tagid]" class="sidebar_tag" target="_blank" style="color:rgba($color1,$color2,$color3,$color4);border-color:rgba($color1,$color2,$color3,$color4);"><!--{$sidebar_tag[tagname]}--></a> <!--{/loop}--> </div> </div>
,随机颜色这个功能一般用于tag标签,js也可以实现,这里说的是在discuz模板里的一种简单做法:
顺便配上tag调用代码
-
<div class="box"> <h3 class="modname"><span class="more"><a href="misc.php?mod=tag">tag列表<em>>></em></a></span>标签</h3> <div class="sidebar_tag_box"> <!--{loop $sidebar_tags $sidebar_tag}--> <!--{eval $color1 = rand(1,255); $color2 = rand(1,255); $color3 = rand(1,255); $color4 = rand(1,255);}--> <a href="misc.php?mod=tag&id=$sidebar_tag[tagid]" class="sidebar_tag" target="_blank" style="color:rgba($color1,$color2,$color3,$color4);border-color:rgba($color1,$color2,$color3,$color4);"><!--{$sidebar_tag[tagname]}--></a> <!--{/loop}--> </div> </div>