In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
In this article Xiaobian introduces in detail "what is the concept of HTML combination selector", the content is detailed, the steps are clear, and the details are handled properly. I hope this article "what is the concept of HTML combination selector" can help you solve your doubts.
A method of combining different selectors, which selects all nodes that can be selected by any one of the selectors in the list. Syntax: a, B for example: div, span matches both elements and elements.
Combiner (Combinators)
The following figure is a DOM structure diagram of an HTML document. Where html is the root node, and head and body are the child nodes of html. Head and body are adjacent to each other. Div is the child node of body and the descendant node of html. Here we mean that children have the same father node, while offspring include children and grandchildren, as well as children and grandchildren under grandchildren. Neighboring brothers are those who have the same father node and are adjacent to each other. If they are not adjacent to each other, they are called ordinary brothers.
Descendant combiner (Descendant combinator)
(space) the combiner selects the descendant node of the previous element.
Grammar: a B
Example: div span matches all elements within any element.
Offspring combiner (Child combinator)
> the combiner selects the direct child nodes of the previous element.
Grammar: a > B
Example: ul > li matches all elements directly nested within the element.
General brother combiner (General sibling combinator)
The combiner selects sibling elements, that is, the latter node is anywhere behind the previous node and shares the same parent node.
Grammar: a ~ B
Example: P ~ span matches the same parent element
All elements after the element.
Next to sibling combiner (Adjacent sibling combinator)
The combiner selects adjacent elements, that is, the latter element follows the previous one and shares the same parent node.
Grammar: a + B
Example: H3 + p matches all immediately after the element
element.
After reading this, the article "what is the concept of HTML combination selector" has been introduced. If you want to master the knowledge of this article, you still need to practice and use it to understand it. If you want to know more about the article, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.