I have multiple html elements with a numeric data attribute:
<div data-content="1"></div>
<div data-content="2"></div>
<div data-content="3"></div>
<div data-content="4"></div>
<div data-content="5"></div>
<div data-content="6"></div>
How can I select only some of these whose data attribute is between two numbers let's say 2 and 6. So I don't have to manually list them in CSS like this:
div[data-content="2"], div[data-content="3"], div[data-content="4"], div[data-content="5"], div[data-content="6"] {
display: none;
}
I would like to do something like:
div[data-content="2-6"] {
display: none;
}
Is there a shorthand syntax for this? Regex or something?