Set the text color interlaced table style columns

For chestnut:
here to a table as follows:

     <table border="1">
    	<tr style="background-color:yellow">
    		<td  width="60">序号</td>
    		<td width="60">地区名称</td>
    		<td width="60">监测时间</td>
    		<td width="60">雨量值(mm)</td>
    		<td width="60">监测站</td>
    		<td width="60">站点地址</td>
    		<td width="60">操作</td>
    	</tr>
    	<tr style="background-color:yellow">
    		<td  width="60">序号1</td>
    		<td width="60">地区名称</td>
    		<td width="60">监测时间</td>
    		<td width="60">雨量值(mm)</td>
    		<td width="60">监测站</td>
    		<td width="60">站点地址</td>
    		<td width="60">操作</td>
    	</tr>
    	<tr style="background-color:yellow">
    		<td  width="60">序号2</td>
    		<td width="60">地区名称</td>
    		<td width="60">监测时间</td>
    		<td width="60">雨量值(mm)</td>
    		<td width="60">监测站</td>
    		<td width="60">站点地址</td>
    		<td width="60">操作</td>
    	</tr>
    
     </table>

Interlaced color requires only a simple syntax to style, this syntax is written in the head tag:

<style type="text/css">
			tr:nth-child(2n){

			background-color: #fbc9a7

}
	</style>
Published 108 original articles · won praise 46 · views 30000 +

Guess you like

Origin blog.csdn.net/qq_44739706/article/details/104409714