0
Guys, I came across this CSS from a free project that I downloaded from the web.
.user-panel>.image>img {}
- What this "nested" notation represents?
- Because the "img" doesn’t have the point (.)?
0
Guys, I came across this CSS from a free project that I downloaded from the web.
.user-panel>.image>img {}
3
Dots are used for classes. HTML elements are only used with their name. The symbol >
meaning immediate descendant.
Other ways to read this selector would be like this:
elemento com classe "user-panel"
que tem um descendente direto
elemento com classe "image"
que tem um descendente direto
elemento HTML "img"
CSS rules will be applied to the element only img
that respects this HTML hierarchy/structure.
In HTML it could be:
<div class="user-panel">
<div class="image">
<img src="..." />
1
This dial means:
Select all elements with the class .user-panel, then select all direct children with the class .image, then select all direct children who are the tag img.
That is to say:
Personal thank you!
Browser other questions tagged css css3
You are not signed in. Login or sign up in order to post.
I believe I’m a duplicate of What is the difference between the selectors "element element" and "element>element"? and What exactly is the element selector.?, of course combined.
– Guilherme Nascimento
@Guilhermenascimento truth, combined answer the question. Had already given
+1
in everything there in those answers. With the links here that you put in the question becomes organized.– Sergio