The function of the plus (+) adjacent selector in the CSS code:
This section describes the role of adjacent selectors in CSS, which is represented by a plus sign (+).
This selector can match the sibling element immediately preceding the selector.
code example:
<!DOCTYPE HTML><HTML><Head><MetaCharSet= "Utf-8"><Metaname= "Author"content= "http://www.softwhy.com/" /><title>Ant Tribe</title><styletype= "Text/css">input[type=radio]:checked + span{background:Blue;}input[type=radio]:checked + span:after{content:"Ant tribe [Url=]2[/url]";}</style></Head><Body><formMethod= "POST"> <fieldset> <legend>Select the item below to try</legend> <ul> <Li><label><inputtype= "Radio"name= "Colour-group"/><span>Blue</span></label></Li> <Li><label><inputtype= "Radio"name= "Colour-group"/><span>Red</span></label></Li> <Li><label><inputtype= "Radio"name= "Colour-group"/><span>Black</span></label></Li> </ul> </fieldset></form></Body></HTML>
The code above demonstrates the role of this selector, and more can be found in related readings.
Related reading:
1. Adjacent selectors can refer to the adjacent selector (e+f) section of the CSS .
2.:checked pseudo-class selectors can be found in the e:checked section of the CSS pseudo-class selector .
3.:after pseudo-element selectors can be found in the E:after/e::after section of the CSS pseudo-object selector .
The original address is: http://www.softwhy.com/forum.php?mod=viewthread&tid=15644
For more information, refer to: http://www.softwhy.com/divcss/
The role of the plus (+) adjacent selector in CSS code