I want to write such a style.
a0,a1,a2,a3
{
margin-top:5px;
}
But what if I have unlimited styles like this?
0~n styles starting with a? Am I not writing this to write about death?
Is there any simple way, other than JS, to write it directly in the CSS style sheet? How to do it?
For example, I want the style of a0~a100. How to write easier?
Then on the other hand, they can use the same class name
You can change your mind and define A common class, and then apply this class on the required elements
Then just use a for these 100
If there are other needs such as a1-a10 a20-a50, each has different needs You can define different class names
so that there will not be so many
You can use the attribute selector [attr^=a], and the matching attribute is all elements starting with a.
Thank you everyone, I have used sass