css1要达到圆角可以用(很麻烦):
<style type="text/CSS">
div#nifty{margin:0}
div.rtop {display:blockbackground:#fff}
div.rtop div {display:blockheight:1pxoverflow:hidden}
div.r1{margin:0 5px}
div.r2{margin:0 3px}
div.r3{margin:0 2px}
div.rtop div.r4 {margin:0 1pxheight:2px}
</style>
<div id="nifty">
<div class="rtop">
<div class="r4"></div>
<div class="r3"></div>
<table style="border:0pt"></table>
<div class="r2"></div>
<div class="r1"></div>
</div>
</div>
<!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/htmlcharset=utf-8" />
<title>千声盒子</title>
<style type="text/css">
/*不要使用标签名作为类名*/
/*.table{text-align:centerwidth:100%height:100%border-width:thinborder-style:solidborder-color:#AA9FFFborder-collapse:separate}*/
.tbClass {
text-align:center
width:100%height:100%
/*首先对大表格加上左边 和 底边*/
/*我自作主张加上了底边框,可以删掉去*/
/*听说FF下不支持缩写,请你自己把下面的写法拆分出来*/
border-left:2px #AA9FFF solid/* 左边框 */
border-bottom:2px #AA9FFF solid/*底边框*/
}
.tbClass td {/*单元格的上边和右边*/
border-top:2px #AA9FFF solid
border-right:2px #AA9FFF solid
}
.tbClass td {/*测试用,为了看到效果,你可以把这个删掉去*/
/*width:100pxheight:80px*/
}
/*专门为“盒子那行写的类”*/
.boxCell td { height:101pxpadding:0margin:0}
</style>
</head>
<body>
<table id="Box" name="Box" class="tbClass" cellspacing=0><!--注意! 1:我把类名由table改成tbClass了, 2: cellspacing=0-->
<?php
for($i=1$i<=1000$i++){
if($i%5==0){
echo "<td>$i</td>"
echo "</tr>
<tr class=\"boxCell\">
<td>盒子</td>
<td>盒子</td>
<td>盒子</td>
<td>盒子</td>
<td>盒子</td>
</tr>
"/////注意! 这里使用了一个boxCell的CSS类,不会那么多冗余代码
echo "<tr>"
}else{
echo "<td>$i</td>"
}
}
?>
</table>
</body>
</html>
//////最后说明;
1。如果乱码,或无显示,请注意你php文件的编码格式,或在浏览器下选择GBK32编码
2。这种专业问题,如果到Csdn 里发帖,十分钟之内就有人回答了
3。百度的BUG:回复后再修改,就不能保持代码的缩进了 -_-!即不能tab缩进,要换成4个空格
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)