实现 Typecho 博客彩色标签云效果

1
2
3
4
5
6
7
8
<?php Typecho_Widget::widget('Widget_Metas_Tag_Cloud', 'limit=26')->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; ?>
1
limit=26 字节数可以修改 具体看自己需求 去掉 ,'limit=26' 试试~

参考 http://www.fufuok.com/typecho-jandan-theme.html

      http://www.boke8.net/typecho-color-tags.html

Comments : 3

  1. human hair wigs

    Lovely great human hair wigs https://youtu.be/3KO3e4I3_24, We have by now put an additional a single down on my Xmas list.

  2. frontal lace wigs

    frontal lace wigs https://www.youtube.com/watch?v=ovU7TuvxKA8 are stylish, wonderful and good for any situation.

  3. 刘明野的博客

    过来看看

发表留言

人生在世,错别字在所难免,无需纠正。