获得随机颜色的php代码

2015-03-19 0 862
获得随机颜色的php代码
<?php
    function randColor(){
        $letters = "1234567890ABCDEF";
        for($i=1;$i<6;$i++){
            $pos = rand(0,16);
            $str .= $string{$pos};
        }
        return "#".$str;
    }
    echo '<span style="color:'.randColor().'">Random Color Text</span>';
?>

遇见资源网 php 获得随机颜色的php代码 http://www.ox520.com/7453.html

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务