Please tell me in this code-- interesting, why do you draw a red line when you get rid of it?

.love {
            --particles: 3;
        }

        .love span {
            animation-delay: calc(20s / var(--particles) * var(--n) * -1);
        }

        .love span:nth-child(1) {
            --n: 1;
        }

        .love span:nth-child(2) {
            --n: 2;
        }

        .love span:nth-child(3) {
            --n: 3;
        }
Apr.21,2021

mdn uses the css variable


this is a css native variable, and the variable name must start with--, otherwise it will be incorrect.


css3 native definition variable

Menu