What is the function of the CSS selector Plus +:
This selector matches the sibling element immediately following the specified element.
The code example is as follows:
<!DOCTYPE HTML><HTML><Head><MetaCharSet= "Utf-8"><Metaname= "Author"content= "http://www.softwhy.com/" /><title>Ant Tribe</title><styletype= "Text/css">#items{width:900px;Height:Auto;margin:0 Auto;padding:5px 0;Clear:both;}#items ul, #items Li{List-style:None;}#items Li{width:500px;Height:28px;text-align: Left;Padding-left:0px;Line-height:28px;Border-bottom:dashed 1px #CCC;cursor:Pointer;}. First + li{Color:Red;}</style></Head><Body><DivID= "Items"> <ul> <Liclass= "First">Ant Tribe welcome you, only struggle to have a better future</Li> <Li>No one is a master at first, must study hard</Li> <Li>The URL address of this site is softwhy.com</Li> <Li>Every day is new, so be true. Current time</Li> <Li>There's a lot of detailed code in the div CSS Tutorial.</Li> </ul></Div></Body></HTML>
The code above can set the font color of the first LI element immediately following the LI element with the class property value to red.
The original address is: http://www.softwhy.com/forum.php?mod=viewthread&tid=18186
For more information, refer to: http://www.softwhy.com/divcss/
What is the role of the CSS selector plus +?