One, intersection selector
<! DOCTYPE html><Htmllang="EN" ><Head><Metacharset="UTF-8" ><TITLE>15-CSS intersection selector. html</Title><!--intersection selector, the part that intersects is the label 1 that you want to set the property value in, Format: Selector 1 selector 2 ... {property: value;} 2, Note: (1), the selector does not have any connection symbol (2), the selector can be a label name, or it can be the ID, class name (3), the intersection selector is just about--<Style> P. para1{ColorRed}</Style></Head><Body><P>, I'm a paragraph.</p><p> I'm the paragraph </p><p class="Para1" > I'm the paragraph </ p><p class="Para1" > I am the paragraph </p>< p> I am theparagraph </ p></body></html>
Two, and set selector
<! DOCTYPE html><Htmllang="EN" ><Head><Metacharset="UTF-8" ><Title>16-css and set selector. html</Title><!--and set selector 1, Format: selector 1, selector 2,... {property: value;} 2, Note: (1), the selector between the use, the connection (2), the selector can be a label name, can also be ID, class name--<Style> . HT,. para{ColorRed}</Style></Head><Body><H1class="HT" > I am the head </h1><p class="Para" > I am the paragraph </p> <p> I am paragraph </p><p> I am paragraph </p><p> I am a paragraph </p></body></html>
Three, brother selector
<! DOCTYPE html><Htmllang="EN" ><Head><Metacharset="UTF-8" ><TITLE>17-CSS brother Selector. html</Title><!--brother Selector, select only Sibling tab 1, adjacent sibling selection (CSS2) format: selector 1+ selector 2{attribute: value;} Note: (1), adjacent selector must use + link (2), the adjacent selector can only select the tag immediately behind, cannot select the separated label 2, The Universal Sibling selector (CSS3), which specifies that all selectors that are behind the selector are selected in the format: Selector 1~ selector 2{property: value;<Style> /*h1+p{*//*color:red;*//*}*/h1~P{ColorRed}</Style></Head><Body><!--<!--<a href= "#" > I am a hyperlink </a>--><!--<p> I'm a paragraph </p>--><!--<p> I'm a paragraph </p>--><!--<p> I'm a paragraph </p>--><!--<!--<p> I'm a paragraph </p>--><!--<p> I'm a paragraph </p>--><!--<p> I'm a paragraph </p>--><h1> I am the title</H1><Ahref="#" > I am a super link</A><P>, I'm a paragraph.</P><p> I'm a paragraph </p> <p> I'm a paragraph </ p><h1> I am the title </h1>< p> I'm a paragraph </p> <p> I'm a paragraph </ p><p> I'm a paragraph. </p></ body></HTML>
< Span class= "hljs-comment" > < Span class= "Hljs-title" >&NBSP;
CSS intersection selector, set selector, sibling selector