表格颜色交替css(1)

<style>
tr{ yexj00:expression(this.style.background=(rowIndex%2==1)?'orange':'yellow')}
</style>
<table width=100% style="border-collapse:collapse; table-layout:fixed" border rules=cols>
<tr>
 <td width=20%> </td><td> </td>
</tr>
<tr>
 <td width=20%> </td><td> </td>
</tr>
<tr>
 <td width=20%> </td><td> </td>
</tr>
<tr>
 <td width=20%> </td><td> </td>
</tr>
<tr>
 <td width=20%> </td><td> </td>
</tr>
<tr>
 <td width=20%> </td><td> </td>
</tr>
</table>

 

你可能感兴趣的:(css)