PHP+table生成柱状图

来源:互联网 发布:java pdf预览功能 编辑:程序博客网 时间:2024/09/21 09:21
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title></head><body><center><div style="border: 1px solid green; text-align: center; width: 1060px; font-size: 12px; height: 430px;"><table width="1040" border="0">  <tr>    <td width="20" valign="top">        <div style="height: 15px; margin-top: 45px;">600</div>        <div style="height: 15px; margin-top: 45px;">500</div>        <div style="height: 15px; margin-top: 45px;">400</div>        <div style="height: 15px; margin-top: 45px;">300</div>        <div style="height: 15px; margin-top: 45px;">200</div>                        <div style="height: 15px; margin-top: 45px;">100</div>        <div style="height: 15px; margin-top: 45px;">0</div>    </td>    <td valign="bottom"><table width="1000" border="0" style="background: url(1.jpg)" height="420">  <tr>          <td> </td><?php for($i=0; $i<30; $i++){?>    <td height="400" width="10" valign="bottom" align="center"><?php $a=rand(0,360);echo intval($a/36*60)?><span style="background: pink; width: 20px; height: <?php echo $a?>px; display: inline-block;"></span></td>    <td> </td>        <?php        }?>  </tr></table>        </td>  </tr></table></div></center></body></html>

0 0
原创粉丝点击