Typecho 彩色标签云

下面是彩色标签云代码,可以添加到需要的地方。

<?php Typecho_Widget::widget('Widget_Metas_Tag_Cloud')->to($tags); ?>
<?php if($tags->have()): ?>
<?php while ($tags->next()): ?>
<a style="color:rgb(<?php echo(rand(0,255)); ?>,<?php echo(rand(0,255)); ?>,
<?php echo(rand(0,255)); ?>)" href="<?php $tags->permalink();?>">
<?php $tags->name(); ?></a>
<?php endwhile; ?>
<?php endif; ?>

评论

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×