I have three span elements:
<span "id="span1" class="class1"> span 1 </span>
<span "id="span2" class="class2"> span 2 </span>
<span "id="span3" class="class1 class2"> span 3 </span>
I want to set the style for the element that has both class1 and class2. So, while the first and third spans share class1 and the second and third spans share class2, I would only like for the third one to be styled according to its classes.
You can do it like this:
Demo.