我想要实现的是,通过将颜色值与子索引相乘,每个子项的颜色都与前一个项不同(结果将类似于渐变)。
伪代码:
.parent > div:nth-child() { background-color: rgb(index * 10, 255, 255); }
html css css-calc
css ×1
css-calc ×1
html ×1