Horje
css hover change other element Code Example
how to change another element on hover
// If the cube is directly inside the container:
#container:hover > #cube { background-color: yellow; }

// If cube is next to (after containers closing tag) the container:
#container:hover + #cube { background-color: yellow; }

// If the cube is somewhere inside the container:
#container:hover #cube { background-color: yellow; }

// If the cube is a sibling of the container:
#container:hover ~ #cube { background-color: yellow; }
css hover affect other item
#container:hover ~ #cube { background-color: yellow; }
css hover change another element
#a:hover ~ #b {
    background: #ccc
}

<div id="a">Div A</div>
<div>random other elements</div>
<div>random other elements</div>
<div>random other elements</div>
<div id="b">Div B</div>
css hover change other element
#container:hover > #cube { background-color: yellow; }
css hover change another element
#a:hover + #b {
    background: #ccc
}

<div id="a">Div A</div>
<div id="b">Div B</div>




Css

Related
link font size html Code Example link font size html Code Example
react import bootstrap css file Code Example react import bootstrap css file Code Example
display flex css Code Example display flex css Code Example
fr meaning in css Code Example fr meaning in css Code Example
css box Code Example css box Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7