| 
function getTagStyle()
{
    $minFontSize=12; //最小字体大小,可根据需要自行更改
    $maxFontSize=25; //最大字体大小,可根据需要自行更改
    return 'font-size:'.($minFontSize+lcg_value()*(abs($maxFontSize-$minFontSize))).'px;color:#'.dechex(rand(0,255)).dechex(rand(0,196)).dechex(rand(0,255));
6
} | 
| 
function getTagStyle()
{
    $sizearray = array('8','9','10','11','12','20');     //自定义字体大小,可根据需要自行修改
    return 'font-size:'.$sizearray[rand(0,count($sizearray))].'pt;color:#'.dechex(rand(0,255)).dechex(rand(0,196)).dechex(rand(0,255));
} | 
| 
{dede:tag row='50' getall='1' sort='hot'}
<a style="[field: total runphp=yes]@me=getTagStyle(); [/field: total];" title="[field:tag /]([field:total /])" href="[field:link/]">[field:tag /]</a>
{/dede:tag} | 
版权声明: 本站资源均来自互联网或会员发布,如果侵犯了您的权益请与我们联系,我们将在24小时内删除!谢谢!
转载请注明: 织梦彩色标签云实现随机颜色和字体大小