相关代码
在头部编写style
<style type="text/css">
table{
border:solidlpxred;
background:#eee;
padding:6px;
}
th{
color:red;
font-size:12px;
font-weight:normal;
}
td{
width:80px;
height:30px;
}
/*第1行 第4个tr标签 以此类推*/
tr:nth-child(4) td:nth-of-type(1){background:hsl(0,100%,100%);}/*第1列*/
tr:nth-child(4) td:nth-of-type(2){background:hsl(0,75%,100%);}/*第2列*/
tr:nth-child(4) td:nth-of-type(3){background:hsl(0,50%,100%);}/*第3列*/
tr:nth-child(4) td:nth-of-type(4){background:hsl(0,25%,100%);}/*第4列*/
tr:nth-child(4) td:nth-of-type(5){background:hsl(0,0%,100%);}/*第5列*/
/*第2行*/
tr:nth-child(5) td:nth-of-type(1){background:hsl(0,100%,88%);}/*第1列*/
tr:nth-child(5) td:nth-of-type(2){background:hsl(0,70%,88%);}/*第2列*/
tr:nth-child(5) td:nth-of-type(3){background:hsl(0,50%,88%);}/*第3列*/
tr:nth-child(5) td:nth-of-type(4){background:hsl(0,25%,88%);}/*第4列*/
tr:nth-child(5) td:nth-of-type(5){background:hsl(0,0%,88%);}/*第5列*/
/*第3行*/
tr:nth-child(6) td:nth-of-type(1){background:hsl(0,100%,75%);}/*第1列*/
tr:nth-child(6) td:nth-of-type(2){background:hsl(0,70%,75%);}/*第2列*/
tr:nth-child(6) td:nth-of-type(3){background:hsl(0,50%,75%);}/*第3列*/
tr:nth-child(6) td:nth-of-type(4){background:hsl(0,25%,75%);}/*第4列*/
tr:nth-child(6) td:nth-of-type(5){ba