<!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>
PHP+table生成柱狀圖
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.