An Interest In:
Web News this Week
- April 29, 2024
- April 28, 2024
- April 27, 2024
- April 26, 2024
- April 25, 2024
- April 24, 2024
- April 23, 2024
July 8, 2019 08:45 pm GMT
Original Link: https://css-tricks.com/a-little-reminder-that-pseudo-elements-are-children-kinda/
A Little Reminder That Pseudo Elements are Children, Kinda.
Here's a container with some child elements:
<div class="container"> <div>item</div> <div>item</div> <div>item</div></div>
If I do:
.container::before { content: "x"}
I'm essentially doing:
<div class="container"> [[[ ::before psuedo-element here ]]] <div>item</div> <div>item</div> <div>item</div></div>
Which will behave just like a child element mostly. One tricky thing is that no selector selects it other than the one you used to create it (or a similar selector that is literally a ::before
or ::after
that ends up in the same … Read article
The post A Little Reminder That Pseudo Elements are Children, Kinda. appeared first on CSS-Tricks.
Original Link: https://css-tricks.com/a-little-reminder-that-pseudo-elements-are-children-kinda/
Share this article:
Tweet
View Full Article