What's the difference between:
.figure-box>figure>img{
width: 440px;
position: relative;
}
To:
.figure-box figure img{
max-width: 100%;
position: relative;
transition: transform 0.6s;
}
What's the difference between:
.figure-box>figure>img{
width: 440px;
position: relative;
}
To:
.figure-box figure img{
max-width: 100%;
position: relative;
transition: transform 0.6s;
}
.A>.B>.C
will select C which is the immediate child of B that is the immediate child of A
.A .B .C
will select C and B for any descendants
The difference is that with >
means that the element has to be direct child, eg:
<div class="figure-box">
<div><div><div><div>
<figure>
<div>
<img src=""/>
</div>
</figure>
</div></div></div></div>
</div>
For this HTML trait, .figure-box figure img
, but .figure-box > figure > img
, because figure
is not a direct child of .figure-box
And for selector without >
, this condition of direct child is independent