CSS - How to select multiple attribute values?
问题 If I have multiple div tags with an attribute containing different numbered values, and I would like to select only number 1 through 10, what is the most efficient way to do this in css? Is there anything like e.g. .div[line-number=1-10] ? 回答1: This is not possible in the standard CSS. It is convenient to use a CSS preprocessor like SASS or LESS which allow you creating loops among many other features. An example with SASS: $selector: '.div'; @for $i from 1 to 10 { $selector: $selector + '