Home>Article>Web Front-end> How to use CSS + (plus sign) selector
In CSS, the " " symbol selector is used to select elements that immediately follow the specified element but are not inside the specific element. The following article will introduce it in detail, I hope it will be helpful to everyone.
" " symbol selector
In CSS, the " " symbol selector is called the relative The neighbor selector is used to select another element immediately following the specified element under the same parent element. [Video tutorial recommendation:CSS tutorial]
Basic sentence structure:
元素E + 元素F{ //CSS属性 }
Instructions:All major browsers Supports " " symbol selector; but when running in IE8, must be declared.
Simple code example
The following is a simple code example to see how to use it.
“+”符号选择器 PHP
HTMLCSS
JavascriptMySQL
Rendering:
It can be seen that h2 div{} is the first div element selected immediately after the h2 element. and add styles to it.
The above is the entire content of this article, I hope it will be helpful to everyone's study. For more exciting content, you can pay attention to the relevant tutorial columns of the PHP Chinese website! ! !
The above is the detailed content of How to use CSS + (plus sign) selector. For more information, please follow other related articles on the PHP Chinese website!