我试图在排序,奇怪,甚至有不同的颜色更容易阅读。表格tr背景颜色变化
这里是我的代码:
$show_res = mysql_query($show_query);
while ($show_row = mysql_fetch_assoc($show_res)){
$rc++;
if (($rc > 1)){
$tr = '#cccccc';
} else {
$tr = '#ffffff';
}?>
<tr style="background-color:<?php echo $tr ;?>">
它不工作,我失去的东西吗?
感谢您的帮助
http://stackoverflow.com/questions/5958471/alternating-table-row-background-colors-on-a-dynamic-table – alexantd
什么浏览器是否在使用? – Jrod
你还有别的东西会设置背景颜色吗?像TD元素一样?要么? – Steven