* {margin:0;padding:0;border:0;border-collapse:collapse;}
table {
width:100%;
}
th, td {
border: 2px solid black;
text-align: center;
}
tbody {
background: -webkit-linear-gradient(left, #729fcf 10%, #93971c 10% 20%, #16eab7 20% 35%, #427b70 35% 45%, #861d53 45% 60%, #729fcf 60% 80%, green 0);
background-attachment:fixed;}
thead tr, thead th { background:transparent; }
渐变显示为带有此代码段的渐变:
-webkit-linear-gradient(left, #729fcf 10%, #93971c 10% 20%, #16eab7 20% 38%, #427b70 38%, #861d53 55%, #729fcf 80%, green 100
%)
请注意,每个点只有一个百分比,或者在所有范围内都分配了同质的颜色。