Why can not I call "pasted" classes like this:
.div1.div2.div3 {
blablabla;
}
I can only do this:
.div1 .div2 .div3{
blablabla
}
I would like to know the difference.
Why can not I call "pasted" classes like this:
.div1.div2.div3 {
blablabla;
}
I can only do this:
.div1 .div2 .div3{
blablabla
}
I would like to know the difference.
From the first mode:
.div1.div2.div3 {
blablabla;
}
You are selecting an element that has all three classes, as follows:
<div class="div1 div2 div3"></div>
In the second case you are working with the following structure:
<div class="div1">
<div class="div2">
<div class="div3">
...
</div>
</div>
</div>
That is, div1 > div2 > div3, in relation to inheritance. Selecting the .div3
child element of the .div2
child element of the .div1
element.