Answers for "how to affect a deffernt element in css"

CSS
7

when hover target diffrent element

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

//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; }
Posted by: Guest on July-19-2020
1

css hover affect other item

#container:hover ~ #cube { background-color: yellow; }
Posted by: Guest on April-15-2020
0

how to affect a deffernt element in css

<div id="container">
  <div id="cube">
  </div>
</div>
Posted by: Guest on August-19-2020

Code answers related to "how to affect a deffernt element in css"

Browse Popular Code Answers by Language